{"id":24662,"date":"2015-08-27T10:05:57","date_gmt":"2015-08-27T08:05:57","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=24662"},"modified":"2015-08-27T10:05:57","modified_gmt":"2015-08-27T08:05:57","slug":"efficient-image-resizing-with-imagemagick","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2015\/08\/27\/efficient-image-resizing-with-imagemagick\/","title":{"rendered":"Efficient Image Resizing With ImageMagick"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><a href=\"http:\/\/www.imagemagick.org\/\">ImageMagick<\/a> is one of my favorite tools ever. \u00a0I&#8217;ve used for years for a whole lot of different things &#8211; from simple image resizing, through animation generation, to palette manipulation. \u00a0And still, I don&#8217;t really know it that well, so when I see articles like this &#8211; &#8220;<a href=\"http:\/\/www.smashingmagazine.com\/2015\/06\/efficient-image-resizing-with-imagemagick\/\">Efficient Image Resizing With ImageMagick<\/a>&#8220;, I get excited. \u00a0Not only it gives you a better way of doing things, but it also explains the path of how to get there. \u00a0From a simple command like:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\nconvert input.jpg -resize 300 output.jpg\r\n<\/pre>\n<p>to something as advanced as this:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\nmogrify \\\r\n  -path OUTPUT_PATH \\\r\n  -filter Triangle \\\r\n  -define filter:support=2 \\\r\n  -thumbnail OUTPUT_WIDTH \\\r\n  -unsharp 0.25x0.25+8+0.065 \\\r\n  -dither None \\\r\n  -posterize 136 \\\r\n  -quality 82 \\\r\n  -define jpeg:fancy-upsampling=off \\\r\n  -define png:compression-filter=5 \\\r\n  -define png:compression-level=9 \\\r\n  -define png:compression-strategy=1 \\\r\n  -define png:exclude-chunk=all \\\r\n  -interlace none \\\r\n  -colorspace sRGB \\\r\n  -strip INPUT_PATH\r\n<\/pre>\n<p>What&#8217;s even more exciting is that it looks like this optimization will make its way into <a href=\"https:\/\/make.wordpress.org\/core\/2015\/08\/26\/notesagenda-4-4-dev-chat-august-26\/\">WordPress 4.4<\/a>, together with some other improvements for the <a href=\"https:\/\/make.wordpress.org\/core\/2015\/08\/25\/responsive-image-support-update\/\">responsive images<\/a>.<\/p>\n<p>Super cool!<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>ImageMagick is one of my favorite tools ever. \u00a0I&#8217;ve used for years for a whole lot of different things &#8211; from simple image resizing, through animation generation, to palette manipulation. \u00a0And still, I don&#8217;t really know it that well, so when I see articles like this &#8211; &#8220;Efficient Image Resizing With ImageMagick&#8220;, I get excited. &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2015\/08\/27\/efficient-image-resizing-with-imagemagick\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Efficient Image Resizing With ImageMagick<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Efficient Image Resizing With ImageMagick #WordPress #WebDev #WebDesign #optimization #ImageMagick","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,18,62,1334,60],"tags":[3372,246,1157,1330],"keyring_services":[],"class_list":["post-24662","post","type-post","status-publish","format-standard","hentry","category-general","category-programming","category-technology","category-web-work","category-wordpress","tag-imagemagick","tag-optimization","tag-web-design","tag-web-development"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":7364,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/03\/23\/resizing-or-rotating-a-banch-of-images\/","url_meta":{"origin":24662,"position":0},"title":"Resizing or rotating a banch of images","author":"Leonid Mamchenkov","date":"March 23, 2004","format":false,"excerpt":"It is very often that one has a need to rotate a bunch of images by 90 or 180 degrees clockwise or otherwise, or resize the same bunch of images to a certain size. Read more to learn how you can do it. First of all, you should defenetely install\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28215,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/11\/13\/easily-optimize-images-using-php\/","url_meta":{"origin":24662,"position":1},"title":"Easily optimize images using PHP","author":"Leonid Mamchenkov","date":"November 13, 2017","format":false,"excerpt":"Via this blog post I came across this PHP image optimization library, which somewhat reminds me of this blog post from a couple of years ago.\u00a0 As good as ImageMagick is, it takes time and effort to find all the right options.\u00a0 With Spatie Image Optimizer you have an almost\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28387,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/02\/15\/idg-document-image-generator\/","url_meta":{"origin":24662,"position":2},"title":"idg &#8211; document image generator","author":"Leonid Mamchenkov","date":"February 15, 2018","format":false,"excerpt":"idg is a very handy tool for programmatically generating images which look like documents and web page templates.\u00a0 It's built on top of the ImageMagick\u00a0and will come native to anyone familiar with the\u00a0 modern grid-based web design.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/02\/idg-390x500.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":28557,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/05\/07\/accurate-instagram-filters-reconstruction\/","url_meta":{"origin":24662,"position":3},"title":"Accurate Instagram Filters Reconstruction","author":"Leonid Mamchenkov","date":"May 7, 2018","format":false,"excerpt":"homm\/color-filters-reconstruction is a GitHub repository with a number of tools that help to automatically or semi-automatically deconstruct the color filters applied to a picture by such services as Instagram, Google Photos, and others. Here's how it works: This method is based on\u00a0three-dimensional lookup tables\u00a0and their two-dimensional representation:\u00a0hald images. The core\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16110,"url":"https:\/\/mamchenkov.net\/wordpress\/2012\/02\/21\/day-in-brief-2012-02-21\/","url_meta":{"origin":24662,"position":4},"title":"Day in brief &#8211; 2012-02-21","author":"Leonid Mamchenkov","date":"February 21, 2012","format":false,"excerpt":"ImageMagick is THE most powerful image manipulation tool... Playing with color mapping and reduction, edge detection and transparency. #","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16109,"url":"https:\/\/mamchenkov.net\/wordpress\/2012\/02\/20\/day-in-brief-2012-02-20\/","url_meta":{"origin":24662,"position":5},"title":"Day in brief &#8211; 2012-02-20","author":"Leonid Mamchenkov","date":"February 20, 2012","format":false,"excerpt":"Nothing wakes you up in the morning better than a compromised server. :-) # New note : Fred's ImageMagick Scripts http:\/\/t.co\/M3akEZrV #","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/24662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=24662"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/24662\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=24662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=24662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=24662"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=24662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}