{"id":2408,"date":"2013-01-08T20:51:09","date_gmt":"2013-01-08T12:51:09","guid":{"rendered":"https:\/\/kyle.ai\/blog\/?p=2408"},"modified":"2013-01-08T20:51:09","modified_gmt":"2013-01-08T12:51:09","slug":"%e5%88%a9%e7%94%a8convert%e5%91%bd%e4%bb%a4%e7%bb%99%e5%9b%be%e7%89%87%e5%8a%a0%e9%98%b4%e5%bd%b1","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/2408.html","title":{"rendered":"\u5229\u7528convert\u547d\u4ee4\u7ed9\u56fe\u7247\u52a0\u9634\u5f71"},"content":{"rendered":"<p><span style=\"font-size: small;\">\u811a\u672c\u6587\u4ef6 image-shadow.sh\uff1a<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#!\/bin\/bash\r\n# run  image-shadow myimage.png to add a shadow to the image\r\n# or run image-shadow myimage.png 6x6 to add a shadow and 6 pixel border\r\n\r\nimage-shadow () {\r\n  out=${1%.*}-shadow.${1#*.}\r\n  in=$1\r\n  echo &quot;Converted file : $out&quot;\r\n  if &#x5B; ! -z $2 ] ; then\r\n    convert $in -frame $2 $out\r\n    in=$out\r\n  fi\r\n  convert $in -bordercolor white -border 13  -bordercolor grey60 -border 1 \\( +clone -background black -shadow 60x5+10+10 \\) \\\r\n    +swap -background none -layers merge +repage $out\r\n}\r\n\r\nimage-shadow $1 $2\r\n\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u7528\u6cd5\uff1a<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n.\/image-shadow.sh ~\/Pictures\/1.png\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u4f7f\u7528\u524d\uff1a<\/span><\/p>\n<p><a href=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2013\/01\/Graphics.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2409\" title=\"Graphics\" src=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2013\/01\/Graphics.png\" alt=\"\" width=\"128\" height=\"128\" \/><\/a><\/p>\n<p><span style=\"font-size: small;\">\u4f7f\u7528\u540e\uff1a<\/span><\/p>\n<p><a href=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2013\/01\/border.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2410\" title=\"border\" src=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2013\/01\/border.png\" alt=\"\" width=\"158\" height=\"158\" srcset=\"https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2013\/01\/border.png 158w, https:\/\/kyle.ai\/blog\/wp-content\/uploads\/2013\/01\/border-150x150.png 150w\" sizes=\"auto, (max-width: 158px) 100vw, 158px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u811a\u672c\u6587\u4ef6 image-shadow.sh\uff1a #!\/bin\/bash # run image-shadow my [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2408","post","type-post","status-publish","format-standard","hentry","category-diary"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=2408"}],"version-history":[{"count":1,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2408\/revisions"}],"predecessor-version":[{"id":2411,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2408\/revisions\/2411"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=2408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=2408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=2408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}