{"id":1781,"date":"2008-07-11T01:50:45","date_gmt":"2008-07-11T01:50:45","guid":{"rendered":"http:\/\/dev.jblove.net\/?p=1781"},"modified":"2008-07-11T01:50:45","modified_gmt":"2008-07-11T01:50:45","slug":"imagemagick%ec%9d%84-%ec%9d%b4%ec%9a%a9%ed%95%9c-%eb%a6%ac%ec%82%ac%ec%9d%b4%ec%a7%95-crop","status":"publish","type":"post","link":"https:\/\/jblove.net\/?p=1781","title":{"rendered":"imageMagick\uc744 \uc774\uc6a9\ud55c \ub9ac\uc0ac\uc774\uc9d5 &#038; Crop"},"content":{"rendered":"<p><P><br \/>\n<TABLE style=\"TABLE-LAYOUT: fixed; OVERFLOW: hidden; WORD-BREAK: break-all; WORD-WRAP: break-word\" cellSpacing=0 cellPadding=0 width=620 align=center><br \/>\n<TBODY><\/p>\n<p><TR><br \/>\n<TD id=bb_view>thumbnail\uc744 \ub9cc\ub4e4\ub54c \uac01\uae30 \uc88c\uc6b0 \ud06c\uae30\uac00 \ub2e4\ub978 \uc0ac\uc9c4\ub4e4\ub54c\ubb38\uc5d0 \ud648\ud398\uc774\uc9c0 \ub808\uc774\uc544\uc6c3\uc774 \uc5c9\ub9dd\uc774 \ub418\ub294 \uacbd\uc6b0\uac00 \ub9ce\uc544\uc11c \uc0ac\uc9c4\ud06c\uae30\uc640 \uc0c1\uad00\uc5c6\uc774 \uc77c\uc815\ud55c \uac00\ub85c\uc138\ub85c\ub97c \uac00\uc9c4 thumbnail\uc744 \uc0dd\uc131\ud558\uae30 \uc704\ud574\uc11c \ub9cc\ub4e4\uc5c8\uc2b5\ub2c8\ub2e4. <BR><BR>\uc6d0\ub9ac\ub294 \uac04\ub2e8\ud569\ub2c8\ub2e4. <BR>\uc6d0\ubcf8\uc0ac\uc9c4\uc758 \ud06c\uae30\ub97c \uce21\uc815\ud574\uc11c \uac00\ub85c\uc138\ub85c\uc911 \ud06c\uae30\uac00 \uc791\uc740 \ucabd\uc774 \uc6d0\ud558\ub294 \uc0ac\uc774\uc988\uac00 \ub418\uac8c \ub9ac\uc0ac\uc774\uc988\ud558\uba74\uc11c \uc911\uc559\uc744 \uc911\uc2ec\uc73c\ub85c \uac00\ub85c\uc138\ub85c\uac00 \uac19\uc740 \ud06c\uae30\uac00 \ub418\uac8c \uc798\ub77c\ub0b4\ub294 \ubc29\uc2dd\uc785\ub2c8\ub2e4. <BR><BR>\ub2f9\uadfc imagemagick\uc774 \uae54\ub824\uc788\uc5b4\uc57c \uc791\ub3d9\ud558\uaca0\uc9c0\uc694? <BR><a href=\"http:\/\/imagemagick.org\/script\/download.php\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/imagemagick.org\/script\/download.php<\/A> \ucc38\uc870&#8230; <BR><BR>[code]<BR>function crop_thumb($jpg1,$jpg2,$width=150) { <BR>&nbsp; &nbsp; $path=&#8221;\/usr\/local\/bin\/&#8221;; \/\/imagemagick \uc2e4\ud589 \uacbd\ub85c <BR>&nbsp; &nbsp; &nbsp; if (!$jpg1||!$jpg2) return; <BR>&nbsp; &nbsp; &nbsp; $size=@getimagesize($jpg1);&nbsp; &nbsp; &nbsp; <BR>&nbsp; &nbsp; &nbsp; if (!$size) return; <BR>&nbsp; &nbsp; &nbsp; if ($size[0]&gt;=$size[1]) { <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $size[0]=intval($size[0]*$width\/$size[1]); <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $size[1]=$width; <BR>&nbsp; &nbsp; &nbsp; } <BR>&nbsp; &nbsp; &nbsp; else if ($size[0]&lt;$size[1]) { <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $size[1]=intval($size[1]*$width\/$size[0]); <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $size[0]=$width; <BR>&nbsp; &nbsp; &nbsp; } <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $x=(int)(($size[0]\/2)-($width\/2)); <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $y=(int)(($size[1]\/2)-($width\/2)); <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($x&lt;0) $x=0; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($y&lt;0) $y=0; <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; $str = &#8220;nice -10 &#8220;.$path.&#8221;convert -compress JPEG -quality 100 -resize $size[0]&#8221;.&#8221;x$size[1] -crop $width&#8221;.&#8221;x&#8221;.&#8221;$width+$x+$y \\&#8221;$jpg1\\&#8221; \\&#8221;$jpg2\\&#8221;&#8221;; <BR>&nbsp; &nbsp; &nbsp; exec($str); <\/TD><\/TR><\/TBODY><\/TABLE><\/P>[\/code]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>thumbnail\uc744 \ub9cc\ub4e4\ub54c \uac01\uae30 \uc88c\uc6b0 \ud06c\uae30\uac00 \ub2e4\ub978 \uc0ac\uc9c4\ub4e4\ub54c\ubb38\uc5d0 \ud648\ud398\uc774\uc9c0 \ub808\uc774\uc544\uc6c3\uc774 \uc5c9\ub9dd\uc774 \ub418\ub294 \uacbd\uc6b0\uac00 \ub9ce\uc544\uc11c \uc0ac\uc9c4\ud06c\uae30\uc640 \uc0c1\uad00\uc5c6\uc774 \uc77c\uc815\ud55c \uac00\ub85c\uc138\ub85c\ub97c \uac00\uc9c4 thumbnail\uc744 \uc0dd\uc131\ud558\uae30 \uc704\ud574\uc11c \ub9cc\ub4e4\uc5c8\uc2b5\ub2c8\ub2e4. \uc6d0\ub9ac\ub294 \uac04\ub2e8\ud569\ub2c8\ub2e4. \uc6d0\ubcf8\uc0ac\uc9c4\uc758 \ud06c\uae30\ub97c \uce21\uc815\ud574\uc11c \uac00\ub85c\uc138\ub85c\uc911 \ud06c\uae30\uac00 \uc791\uc740 \ucabd\uc774 \uc6d0\ud558\ub294 \uc0ac\uc774\uc988\uac00 \ub418\uac8c \ub9ac\uc0ac\uc774\uc988\ud558\uba74\uc11c \uc911\uc559\uc744 \uc911\uc2ec\uc73c\ub85c \uac00\ub85c\uc138\ub85c\uac00 \uac19\uc740 \ud06c\uae30\uac00 \ub418\uac8c \uc798\ub77c\ub0b4\ub294 \ubc29\uc2dd\uc785\ub2c8\ub2e4. \ub2f9\uadfc imagemagick\uc774 \uae54\ub824\uc788\uc5b4\uc57c \uc791\ub3d9\ud558\uaca0\uc9c0\uc694? http:\/\/imagemagick.org\/script\/download.php \ucc38\uc870&#8230; [code]function crop_thumb($jpg1,$jpg2,$width=150) { &nbsp; &nbsp; $path=&#8221;\/usr\/local\/bin\/&#8221;; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[51],"tags":[],"class_list":["post-1781","post","type-post","status-publish","format-standard","hentry","category-papa-php"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/1781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1781"}],"version-history":[{"count":0,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/1781\/revisions"}],"wp:attachment":[{"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}