{"id":682,"date":"2002-11-25T01:19:58","date_gmt":"2002-11-25T01:19:58","guid":{"rendered":"http:\/\/dev.jblove.net\/?p=682"},"modified":"2002-11-25T01:19:58","modified_gmt":"2002-11-25T01:19:58","slug":"%ec%9e%90%eb%b0%94%ec%8a%a4%ed%81%ac%eb%a6%bd%ed%8a%b8%eb%a1%9c-%ec%9d%b4%eb%af%b8%ec%a7%80-%eb%af%b8%eb%a6%ac%eb%b3%b4%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/jblove.net\/?p=682","title":{"rendered":"\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\ub85c \uc774\ubbf8\uc9c0 \ubbf8\ub9ac\ubcf4\uae30"},"content":{"rendered":"<p><Script language='Javascript'><br \/>\n<!--<br \/>\n\/\/<br \/>\n\/\/ Javascript \uc774\ubbf8\uc9c0 \ubbf8\ub9ac\ubcf4\uae30<br \/>\n\/\/<br \/>\nvar layout_image;<br \/>\n\/\/ \ubbf8\ub9ac\ubcf4\uae30\ud560 \uc774\ubbf8\uc9c0\uacbd\ub85c\uba85<br \/>\nvar myImage;<br \/>\n\/\/ Image\uac1d\uccb4 \ubcc0\uc218<br \/>\nvar rewidth, reheight;<br \/>\n\/\/ \uc774\ubbf8\uc9c0 \ud06c\uae30(\uacc4\uc0b0\uacb0\uacfc)<br \/>\nvar xwidth, xheight;<br \/>\n\/\/ \uae30\uc900 \uc0ac\uc774\uc988(\uc774 \ud06c\uae30\uc5d0 \ub9de\ucdb0\uc9d0)\n\n\nfunction layout(file)<br \/>\n{<br \/>\n\tlayout_image = file;<br \/>\n\t\/\/ \uc774\ubbf8\uc9c0 \ud30c\uc77c\uc758 \uacbd\ub85c\uba85<br \/>\n\txwidth=200;<br \/>\n\txheight=200;<br \/>\n\t\/\/ \uc774 \uc0ac\uc774\uc988\uc5d0 \ub9de\ucdb0\uc838\uc11c \uc774\ubbf8\uc9c0\uc758 \ud06c\uae30\uac00 \uc870\uc808\ub428\n\n\n\tmyImage = new Image();<br \/>\n\tmyImage.src = file;<br \/>\n\t\/\/ Image\uac1d\uccb4\ub97c \uc0dd\uc131\ud558\uace0 \uacbd\ub85c\uba85\uc744 \ub300\uc785\n\n\n\tdelay();<br \/>\n\t\/\/ \uc774\ubbf8\uc9c0\ub97c \ub85c\ub529\ud558\ub294 \ud568\uc218<br \/>\n}\n\n\nfunction delay()<br \/>\n{<br \/>\n\tif ((myImage == null) || (myImage.complete != true))<br \/>\n\t{<br \/>\n\t\/\/ myImage\uac00 \ub85c\ub529\uc774 \ub2e4\ub410\ub294\uc9c0 \ud655\uc778<br \/>\n\t\t\twindow.setTimeout(\"delay()\", 100);<br \/>\n\t\t\t\/\/ \ub85c\ub529\uc774 \ub2e4 \uc548\ub410\ub2e4\uba74<br \/>\n\t\t\t\/\/ 1\/20\ucd08 \uac04\uaca9\uc73c\ub85c \uc774\ubbf8\uc9c0\ub97c \uc7ac\ub85c\ub529<br \/>\n\t\t\t\/\/ \ubc18\ubcf5\ub8e8\ud504\ub85c \uc2dc\uac04\uc744 \uc9c0\uc5f0\uc2dc\ucf1c\ub3c4 \ub418\uc9c0\ub9cc<br \/>\n\t\t\t\/\/ \uc7ac\uadc0\uc801 \ud638\ucd9c\uc5d0 \uc758\ud55c \uc7ac\ub85c\ub529\uc73c\ub85c \ub85c\ub529\uc644\ub8cc\ub97c \ud655\uc778\ud55c\ub2e4<br \/>\n\t}<br \/>\n\telse<br \/>\n\t{<br \/>\n\t\tcalculaterate();<br \/>\n\t\tdisplay();<br \/>\n\t\t\/\/ \uc774\ubbf8\uc9c0\uc758 \uc0c8\ub85c\uc6b4 \ud06c\uae30\ub97c \uacc4\uc0b0\ud558\uace0 \ucd9c\ub825<br \/>\n\t}<br \/>\n}\n\n\nfunction calculaterate()<br \/>\n{<br \/>\n\tvar width, height;\/\/ Image\uac1d\uccb4\uc5d0\uc11c \uc774\ubbf8\uc9c0\uc758 \ud06c\uae30\ub97c \uc554<br \/>\n\tvar rwidth, rheight;\/\/ \uc6d0\ub798 \uc0ac\uc774\uc988\uc640 \uae30\uc900 \uc0ac\uc774\uc988\uc758 \ucc28<br \/>\n\tvar vswidth, vsheight, vs;\/\/ \uc774\ubbf8\uc9c0\uc758 \ud06c\uae30\ub97c \uc904\uc774\ub294 \ube44\uc728\n\n\n\twidth=myImage.width;<br \/>\n\theight=myImage.height;<br \/>\n\t\/\/ myImage\uac1d\uccb4\uc5d0\uc11c \uc774\ubbf8\uc9c0\uc758 \uc6d0\ub798 \ud06c\uae30\ub97c \uac00\uc838\uc628\ub2e4\n\n\n\trwidth=width - xwidth;<br \/>\n\trheight=height - xheight;<br \/>\n\t\/\/ \ubcf4\uc5ec\uc8fc\ub824\ub294 \uae30\uc900\uc774 \ub418\ub294 \ud06c\uae30\uc640 \uc6d0\ub798 \ud06c\uae30\uc758 \ucc28\ub97c \uad6c\ud568\n\n\n\tif (rwidth > 0 || rheight > 0)<br \/>\n\t\/\/ \uc774\ubbf8\uc9c0\uac00 \ubcf4\uc5ec\uc8fc\ub824\ub294 \ud06c\uae30\ubcf4\ub2e4 \ud06c\ub2e4\uba74<br \/>\n\t\t{<br \/>\n\t\t\tvswidth=xwidth\/width;<br \/>\n\t\t\tvsheight=xheight\/height;<br \/>\n\t\t\t\/\/ \uc774\ubbf8\uc9c0\uac00 \uc5bc\ub9c8\ub098 \ud070\uc9c0 \ube44\uc728\uc744 \uad6c\ud568\n\n\n\t\t\tif (vswidth < vsheight)<br \/>\n\t\t\t\tvs = vswidth;<br \/>\n\t\t\telse<br \/>\n\t\t\t\tvs = vsheight;<br \/>\n\t\t\t\/\/ \ube44\uc728\uc774 \uc801\uc740 \ucabd\uc744 \uc120\ud0dd\ud568\n\n\n\t\t\trewidth=Math.floor(width*vs);<br \/>\n\t\t\treheight=Math.floor(height*vs);<br \/>\n\t\t\t\/\/ \ud06c\uae30\ub97c \uacc4\uc0b0<br \/>\n\t\t}<br \/>\n\telse<br \/>\n\t\t{<br \/>\n\t\t\trewidth=width;<br \/>\n\t\t\treheight=height;<br \/>\n\t\t\t\/\/ \uc774\ubbf8\uc9c0 \ud06c\uae30\uac00 \uae30\uc900\uc774 \ub418\ub294 \ud06c\uae30\ubcf4\ub2e4 \uc791\uc740 \uacbd\uc6b0\uc5d4 \uadf8\ub0e5 \uc0ac\uc6a9\ud568<br \/>\n\t\t}<br \/>\n}\n\n\nfunction display()<br \/>\n{<br \/>\n\tmyImage = null;<br \/>\n\t\/\/ myImage\uac1d\uccb4\uc5d0 null\uc744 \ub300\uc785\ud568\n\n\n\tdocument.test.layout_img.src = layout_image;<br \/>\n\tdocument.test.layout_img.width = rewidth;<br \/>\n\tdocument.test.layout_img.height = reheight;<br \/>\n\t\/\/ \uc774\ubbf8\uc9c0 \uacbd\ub85c\uba85\uacfc \uacc4\uc0b0\uacb0\uacfc\ub97c \ub300\uc785\ud568<br \/>\n}\n\n\n\/\/--><br \/>\n<\/Script><br \/>\n<\/HEAD><br \/>\n<BODY><br \/>\n<FORM name='test' action='' method=''><br \/>\n<TABLE><br \/>\n\t<TR><br \/>\n\t\t<TD><br \/>\n\t\t\t<INPUT type='file' name='up_image'><br \/>\n\t\t<\/TD><br \/>\n\t\t<TD><br \/>\n\t\t\t<INPUT type='button' name='' value='\ubbf8\ub9ac\ubcf4\uae30' onClick='layout(document.test.up_image.value)'><br \/>\n\t\t<\/TD><br \/>\n\t<\/TR><br \/>\n\t<TR><br \/>\n\t\t<TD colspan='2' width='200' height='170'><br \/>\n\t\t\t<IMG name='layout_img' src='' width='' height='' border='0'><br \/>\n\t\t<\/TD><br \/>\n\t<\/TR><br \/>\n<\/TABLE><br \/>\n<\/FORM><\/p>\n","protected":false},"excerpt":{"rendered":"","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-682","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\/682","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=682"}],"version-history":[{"count":0,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/682\/revisions"}],"wp:attachment":[{"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}