{"id":182,"date":"2008-05-22T11:34:50","date_gmt":"2008-05-22T11:34:50","guid":{"rendered":"http:\/\/blog.stmellion.org\/?p=182"},"modified":"2008-05-22T11:47:00","modified_gmt":"2008-05-22T11:47:00","slug":"image-manipulation","status":"publish","type":"post","link":"https:\/\/blog.stmellion.org\/?p=182","title":{"rendered":"Image Manipulation"},"content":{"rendered":"<p>In a <a href=\"https:\/\/blog.stmellion.org\/?p=173\">recent blog article<\/a> I used <a href=\"http:\/\/www.wordpress.org\">WordPress<\/a> to embed images into a posting.  This was very simple to do but there is a drawback: The image embedded within the post is identical in size and resolution to the one viewed if the image hyperlink is clicked.  This makes the post and initial webpage very bulky to view.<\/p>\n<p>I could solve this by copying the images to a PC with a GUI, manipulating them to create thumbnails and then copying them back again, not exactly a slick process.  My solution is to use <a href=\"http:\/\/www.imagemagick.org\/\">ImageMagick<\/a> tools.<\/p>\n<p><strong>Convert JPEG to PNG<\/strong><br \/>\nconvert image.jpg image.png<\/p>\n<p><strong>Resize by percentage<\/strong><br \/>\nconvert image.png -resize 50% newimage.png<\/p>\n<p><strong>Resize to fixed size<\/strong><br \/>\nconvert image.png -resize 240&#215;240 newimage.png<br \/>\n<em>The above command does not change the image ratio, it just best-fits the existing ratio within the boundaries of the box defined by -resize.<\/em><\/p>\n<p><strong>Rotate by 90 degress<\/strong><br \/>\nconvert image.png -rotate 90 newimage.png<br \/>\n<em>To rotate 90 degrees anti-clockwise use -rotate -90.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a recent blog article I used WordPress to embed images into a posting. This was very simple to do but there is a drawback: The image embedded within the post is identical in size and resolution to the one viewed if the image hyperlink is clicked. This makes the post and initial webpage very&hellip; <a class=\"more-link\" href=\"https:\/\/blog.stmellion.org\/?p=182\">Continue reading <span class=\"screen-reader-text\">Image Manipulation<\/span><\/a><\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-182","post","type-post","status-publish","format-standard","hentry","category-debian","entry"],"_links":{"self":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=182"}],"version-history":[{"count":0,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}