{"id":86,"date":"2016-12-30T13:56:39","date_gmt":"2016-12-30T13:56:39","guid":{"rendered":"https:\/\/thinkdebian.net\/blog\/?p=86"},"modified":"2017-11-26T18:07:24","modified_gmt":"2017-11-26T18:07:24","slug":"add-dropshadow-image-imagemagick","status":"publish","type":"post","link":"https:\/\/thinkdebian.net\/blog\/add-dropshadow-image-imagemagick\/","title":{"rendered":"add dropshadow to image with imagemagick"},"content":{"rendered":"<p>Tiny shell script to add drop shadow to a PNG image with the use of convert(1) from ImageMagick and save the output as a new file with .shadow appended to the input image file name, before the suffix.<\/p>\n<pre lang=\"bash\">#!\/bin\/sh\r\nconvert $1 -bordercolor none -border 12 \\( +clone -background black \\\r\n-shadow 80x3+3+3 \\) +swap -background white -layers merge +repage \\\r\n`basename $1 .png`.shadow.png\r\nexit\r\n<\/pre>\n<p>where $1 is the input image filename.<\/p>\n<p>I should properly rewrite this script so it performs some error checking at least, but it&#8217;s enough for my use case as it is so I haven&#8217;t improved it yet. Hopefully someone finds it useful as well.<\/p>\n<p>I don&#8217;t take credit for the actual command, it&#8217;s a combination of directives I found on some forum answer online, but it&#8217;s easier to get back to this note should I need to.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tiny shell script to add drop shadow to a PNG image with the use of convert(1) from ImageMagick and save the output as a new file with .shadow appended to the input image file name, before the suffix. #!\/bin\/sh convert $1 -bordercolor none -border 12 \\( +clone -background black \\ -shadow 80&#215;3+3+3 \\) +swap -background &#8230; <a title=\"add dropshadow to image with imagemagick\" class=\"read-more\" href=\"https:\/\/thinkdebian.net\/blog\/add-dropshadow-image-imagemagick\/\" aria-label=\"More on add dropshadow to image with imagemagick\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[29,28,27],"_links":{"self":[{"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/posts\/86"}],"collection":[{"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":12,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":211,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions\/211"}],"wp:attachment":[{"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}