{"id":28,"date":"2002-06-19T04:48:04","date_gmt":"2002-06-19T04:48:04","guid":{"rendered":"http:\/\/dev.jblove.net\/?p=28"},"modified":"2002-06-19T04:48:04","modified_gmt":"2002-06-19T04:48:04","slug":"%ea%b0%80%eb%a1%9c%ec%84%b8%eb%a1%9c-%eb%b9%84%ec%9c%a8%ed%8b%80%eb%a0%a4%ec%a7%80%ec%a7%80-%ec%95%8a%ea%b3%a0-%ed%81%ac%ea%b8%b0%ec%97%90-%eb%a7%9e%eb%8a%94-%ec%8d%b8%eb%84%a4%ec%9d%bc-%eb%a7%8c","status":"publish","type":"post","link":"https:\/\/jblove.net\/?p=28","title":{"rendered":"\uac00\ub85c\uc138\ub85c \ube44\uc728\ud2c0\ub824\uc9c0\uc9c0 \uc54a\uace0 \ud06c\uae30\uc5d0 \ub9de\ub294 \uc378\ub124\uc77c \ub9cc\ub4e4\uae30"},"content":{"rendered":"<p>\ucd9c\ucc98 &#8211; phpschool.com <\/p>\n<p>\uc774\ub7f0\uac8c \ud544\uc694\ud574\uc11c \uac80\uc0c9\ud574\ubd24\ub354\ub2c8 \uac00\ub85c\uc138\ub85c \ube44\uc728 \uc720\uc9c0\ud558\uba74\uc11c \ub9cc\ub4dc\ub294\uac70\ub098, \ubb34\uc870\uac74 \ud06c\ub86d\uc2dc\ud0a4\ub294 \uc18c\uc2a4\ub294 \uc788\ub294\ub370 \uc54c\ub9de\ub294 \ud06c\uae30\ub85c \ube44\uc728\uc744 \uc720\uc9c0\ud558\uba70 \ub9cc\ub4dc\ub294\uac74 \uc5c6\ub354\uad70\uc694.. \ud558\ub098 \uc788\uae34 \ud588\ub294\ub370 \ub9ac\ub205\uc2a4 \uba85\ub839\uc744 \uc0ac\uc6a9\ud558\ub294\uac70\ub77c\uc11c \uc774\uc2dd\uc131\ubd80\uc871\ud588\uad6c\uc694.. <br \/>\n\uadf8\ub0e5 gd\ub9cc\uc744 \uc774\uc6a9\ud574\uc11c \uc378\ub124\uc77c\uc744 \ub9cc\ub4e4\uc5b4\uc8fc\ub294 \ud568\uc218\uc785\ub2c8\ub2e4. <br \/>\n600&#215;400 \uc774\ubbf8\uc9c0\ub97c 300&#215;200 \uc73c\ub85c \ub9cc\ub4e4\ub77c\uace0 \ud558\uba74 \ub2f9\uc5f0\ud788 \ube44\uc728\uc5d0 \ub9de\uac8c \uc904\uc5ec\uc9c0\uaca0\uc9c0\ub9cc 400&#215;600\uc774\ubbf8\uc9c0\ub97c 300&#215;200\uc73c\ub85c \ub9cc\ub4e4\ub77c\uace0 \ud558\uba74 3\/4 \ube44\uc728\ub85c \uc904\uc778\ud6c4 \uc138\ub85c\ub97c \uac00\uc6b4\ub370\ub97c \uc911\uc2ec\uc73c\ub85c crop \uc2dc\ucf1c\uc90d\ub2c8\ub2e4. <br \/>\n\uc774\ubbf8\uc9c0\uc5d0\uc11c \uc911\uc694\ud55c \ubd80\ubd84\uc740 \uac00\uc6b4\ub370\ucabd\uc5d0 \uc788\uc744\uaebc\uac19\uc544\uc11c \uac00\uc6b4\ub370\ub97c \uc911\uc2ec\uc73c\ub85c \uc591\ucabd \ub610\ub294 \uc704\uc544\ub798\ub97c \uc798\ub77c\ub0b4\ub3c4\ub85d \ud588\uc2b5\ub2c8\ub2e4. \ud2b9\ubcc4\ud55c \uae30\uc220\uc774\ub77c\uae30 \ubcf4\ub2e4 \uc774\ub7f0\uac78 \ucc3e\ub294\ubd84\ub4e4 \uc27d\uac8c \ucc3e\uc73c\uc2dc\ub77c\uace0 \uc62c\ub824\ub4dc\ub9bd\ub2c8\ub2e4.. \uac80\uc0c9\uc5d0 \uc798 \uac78\ub9ac\uac8c \ud0a4\uc6cc\ub4dc\ub3c4 \ub123\uc5b4\ub450\uc9c0\uc694. \u314e\u314e <br \/>\n<!-- \ud0a4\uc6cc\ub4dc: gd, \uc774\ubbf8\uc9c0, \ub9ac\uc0ac\uc774\uc988, \uc378\ub124\uc77c, thumbnail, \ube44\uc728, \ubc30\uc728 --> <\/p>\n<p>\uc0ac\uc6a9\ubc95\uc740 thumbnail(\ud30c\uc77c\uba85,x\uc0ac\uc774\uc988,y\uc0ac\uc774\uc988) \uc785\ub2c8\ub2e4. <br \/>\n\uadf8\ub7fc \uc18c\uc2a4 \uac11\ub2c8\ub2e4. <br \/>\n<? <br \/>\n\/**************************************************************************** <br \/>\n* thumbnail.lib.php <br \/>\n* \uac00\ub85c\uc138\ub85c \ube44\uc728\uc774 \ud750\ud2b8\ub7ec\uc9c0\uc9c0 \uc54a\uace0 \uc9c0\uc815\ud55c \ud06c\uae30\ub85c \uc378\ub124\uc77c\uc744 \ub9cc\ub4e4\uc5b4\uc90c <br \/>\n* 2002.2.18 &#8211; \uac70\uce5c\ub9c8\ub8e8 <br \/>\n*****************************************************************************\/ <\/p>\n<p>## Image LoadJpeg (String $fName); <br \/>\nfunction LoadImage ($fName) { <br \/>\n    $file_ext = strtolower(substr(strrchr($fName,&#8221;.&#8221;), 1)); \/\/\ud655\uc7a5\uc790 <br \/>\n    switch ($file_ext) { <br \/>\n        case &#8220;jpg&#8221;: case &#8220;jpeg&#8221;: <br \/>\n            $im = @ImageCreateFromJPEG ($fName); <br \/>\n            break; <br \/>\n        case &#8220;gif&#8221;: <br \/>\n            $im = @ImageCreateFromGIF ($fName); <br \/>\n            break; <br \/>\n        case &#8220;png&#8221;: <br \/>\n            $im = @ImageCreateFromPNG ($fName); <br \/>\n            break; <br \/>\n    } <\/p>\n<p>    if (!$im) { <br \/>\n        $im = ImageCreate (150, 30); <br \/>\n        $bgc = ImageColorAllocate ($im, 255, 255, 255); <br \/>\n        $tc  = ImageColorAllocate ($im, 0, 0, 0); <br \/>\n        ImageFilledRectangle ($im, 0, 0, 150, 30, $bgc); <br \/>\n        ImageString ($im, 1, 5, 5, &#8220;Error loading $fName&#8221;, $tc); <br \/>\n    } <br \/>\n    return $im; <br \/>\n} <\/p>\n<p>## Image thumbnail_jpg(String $filepath, int $width, int $height); <br \/>\nfunction thumbnail ($filepath,$width=&#8221;&#8221;,$height=&#8221;&#8221;) { <br \/>\n    $size=getimagesize($filepath); \/\/\uc6d0\ubcf8 \uc774\ubbf8\uc9c0\uc0ac\uc774\uc988\ub97c \uad6c\ud568 <br \/>\n    $shr_rateX = $width \/ $size[0]; <br \/>\n    $shr_rateY = $height \/ $size[1]; <br \/>\n    $base = ($shr_rateX <= $shr_rateY) ? \"y\" : \"x\"; <br \/>\n    $src_im=LoadImage($filepath); <br \/>\n    if($base == &#8220;y&#8221;) { <br \/>\n        $new_width=round(($size[0] * $height)\/$size[1]);    \/\/ (\uac00\ub85c\ud06c\uae30 * \uc0c8\ub85c\uc6b4 \uc138\ub85c \ud06c\uae30) \/ \uc138\ub85c\ud06c\uae30 <br \/>\n        $offsetX = round(($new_width &#8211; $width) \/ 2);     \/\/\uac01\uac01 \uc88c\uc6b0\ub85c \uc798\ub77c\ub0bc \uae38\uc774 <br \/>\n        $offsetY = 0; <br \/>\n    } <br \/>\n    if($base == &#8220;x&#8221;) { <br \/>\n        $size=getimagesize($filepath);        \/\/\uc6d0\ubcf8 \uc774\ubbf8\uc9c0 \uc0ac\uc774\uc988 \uad6c\ud568 <br \/>\n        $new_height=round(($size[1] * $width)\/$size[0]);     \/\/ (\uc138\ub85c\ud06c\uae30 * \uc0c8\ub85c\uc6b4 \uac00\ub85c\ud06c\uae30) \/ \uac00\ub85c\ud06c\uae30 <br \/>\n        $offsetX = 0; <br \/>\n        $offsetY = round(($new_height &#8211; $height) \/ 2);    \/\/ \uac01\uac01 \uc0c1\ud558\ub85c \uc798\ub77c\ub0bc \uae38\uc774 <br \/>\n    } <\/p>\n<p>    $dst_im=ImageCreate($width,$height);     \/\/\uacb0\uacfc\ubb3c \uc774\ubbf8\uc9c0 \uc0dd\uc131 <br \/>\n    ImageCopyResized($dst_im,$src_im,0,0,$offsetX,$offsetY,$width,$height,ImageSX($src_im)-$offsetX,ImageSY($src_im)-$offsetY);     \/\/\ub9cc\ub4e4\uae30 <br \/>\n    return $dst_im; <br \/>\n} <\/p>\n<p>?> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ucd9c\ucc98 &#8211; phpschool.com \uc774\ub7f0\uac8c \ud544\uc694\ud574\uc11c \uac80\uc0c9\ud574\ubd24\ub354\ub2c8 \uac00\ub85c\uc138\ub85c \ube44\uc728 \uc720\uc9c0\ud558\uba74\uc11c \ub9cc\ub4dc\ub294\uac70\ub098, \ubb34\uc870\uac74 \ud06c\ub86d\uc2dc\ud0a4\ub294 \uc18c\uc2a4\ub294 \uc788\ub294\ub370 \uc54c\ub9de\ub294 \ud06c\uae30\ub85c \ube44\uc728\uc744 \uc720\uc9c0\ud558\uba70 \ub9cc\ub4dc\ub294\uac74 \uc5c6\ub354\uad70\uc694.. \ud558\ub098 \uc788\uae34 \ud588\ub294\ub370 \ub9ac\ub205\uc2a4 \uba85\ub839\uc744 \uc0ac\uc6a9\ud558\ub294\uac70\ub77c\uc11c \uc774\uc2dd\uc131\ubd80\uc871\ud588\uad6c\uc694.. \uadf8\ub0e5 gd\ub9cc\uc744 \uc774\uc6a9\ud574\uc11c \uc378\ub124\uc77c\uc744 \ub9cc\ub4e4\uc5b4\uc8fc\ub294 \ud568\uc218\uc785\ub2c8\ub2e4. 600&#215;400 \uc774\ubbf8\uc9c0\ub97c 300&#215;200 \uc73c\ub85c \ub9cc\ub4e4\ub77c\uace0 \ud558\uba74 \ub2f9\uc5f0\ud788 \ube44\uc728\uc5d0 \ub9de\uac8c \uc904\uc5ec\uc9c0\uaca0\uc9c0\ub9cc 400&#215;600\uc774\ubbf8\uc9c0\ub97c 300&#215;200\uc73c\ub85c \ub9cc\ub4e4\ub77c\uace0 \ud558\uba74 3\/4 \ube44\uc728\ub85c \uc904\uc778\ud6c4 \uc138\ub85c\ub97c \uac00\uc6b4\ub370\ub97c \uc911\uc2ec\uc73c\ub85c crop \uc2dc\ucf1c\uc90d\ub2c8\ub2e4. [&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-28","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\/28","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=28"}],"version-history":[{"count":0,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/28\/revisions"}],"wp:attachment":[{"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}