___
¼Õ½ÂÇý (¼­¿ï´ë ¼®»ç¹ÝÁÖ¶§ ÃÔ¿µ)
http://classiclove...
ºÒÀÇÇÏ´ÂÀÚ ´õ·¯¿îÀÚ ÀǷοîÀÚ °Å·èÇÑ..
¹æ¸í·Ï
http://ilhan4u.tistory.com/361

¤ýÀÛ¼ºÀÚ sapali
¤ýÀÛ¼ºÀÏ 2014-01-20 16:23
¤ýºÐ ·ù °æÁÖ
¤ýÃßõ: 0  ¤ýÁ¶È¸: 7      
¤ýIP: 211.xxx.231
°íÇØ»óµµ À̹ÌÁö ÀԷ¿¡ ´ëÇÑ Ã³¸®¹æ¹ý·Ð ¡±

Çػ󤾵µ ³ôÀº µðÄ«·Î ÂïÀº »çÁøÀ» °Ô½ÃÆÇ¿¡ ¿Ã¸®¸é, ¿ë·®ÀÌ Á¦ÇѵǾî ÀÖÁö¾Ê´Â ÇÑ ÇÑ ÀÚ¸®¸¦ Â÷ÁöÇϰԵǴµ¥,


ÀÌ·¯ÇÑ »çÁøµéÀ» ÀÚµ¿À¸·Î ÁÙ¿©Áָ鼭 (Å©±â,Ä÷¸®Æ¼)¿øº» »çÁøÀ» »èÁ¦ÇÏ´Â ±â´ÉÀ» ±¸ÇöÇغýÀ´Ï´Ù.


¾ÆÁ÷ Àû¿ëÀüÀε¥, Àû¿ëµÇ¾î¼­ ¸ðµâ·Î °ø°³Çϵµ·Ï ÇÏ°Ú½À´Ï´Ù.

1. °Ô½Ã¹°À» ÀúÀåÇϸé, º»¹®³» »çÁøÀ» üũÇÕ´Ï´Ù.
2. »çÁøµé¿¡ ´ëÇÑ Å©±â ¹× Ä÷¸®Æ¼ ó¸®ÇÏ¿©, ¼­¹ö¿¡ ÀúÀåÇÕ´Ï´Ù.
3. ¿øº»»çÁøµéÀº »èÁ¦ÇÕ´Ï´Ù.
4. º»¹®¿¡ ÃÖÀûÈ­µÈ À̹ÌÁö·Î °æ·Î¸¦ ´ëóÇÕ´Ï´Ù.

Å×½ºÆ® °á°úÀÚ·á. (ÇØ»óµµ ÁÙÀÌ°í, Ä÷¸®Æ¼ ÁÙÀÌ°í..1.07MB -> 22.69KB·Î )


 


±âº»¼Ò½ºÀÔ´Ï´Ù.

<?
function resize_image($file,
$width = 0,
$height = 0,
$proportional = false,
$output = 'file',
$delete_original = true,
$use_linux_commands = false,
$quality = 100
) {

if ( $height <= 0 && $width <= 0 ) return false;
# Setting defaults and meta
$info = getimagesize($file);
$image = '';
$final_width = 0;
$final_height = 0;
list($width_old, $height_old) = $info;
# Calculating proportionality
if ($proportional) {
if ($width == 0) $factor = $height/$height_old;
elseif ($height == 0) $factor = $width/$width_old;
else $factor = min( $width / $width_old, $height / $height_old );
$final_width = round( $width_old * $factor );
$final_height = round( $height_old * $factor );
}
else {
$final_width = ( $width <= 0 ) ? $width_old : $width;
$final_height = ( $height <= 0 ) ? $height_old : $height;
}
# Loading image to memory according to type
switch ( $info[2] ) {
case IMAGETYPE_GIF: $image = imagecreatefromgif($file); break;
case IMAGETYPE_JPEG: $image = imagecreatefromjpeg($file); break;
case IMAGETYPE_PNG: $image = imagecreatefrompng($file); break;
default: return false;
}


# This is the resizing/resampling/transparency-preserving magic
$image_resized = imagecreatetruecolor( $final_width, $final_height );
if ( ($info[2] == IMAGETYPE_GIF) || ($info[2] == IMAGETYPE_PNG) ) {
$transparency = imagecolortransparent($image);
if ($transparency >= 0) {
$transparent_color = imagecolorsforindex($image, $trnprt_indx);
$transparency = imagecolorallocate($image_resized, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']);
imagefill($image_resized, 0, 0, $transparency);
imagecolortransparent($image_resized, $transparency);
}
elseif ($info[2] == IMAGETYPE_PNG) {
imagealphablending($image_resized, false);
$color = imagecolorallocatealpha($image_resized, 0, 0, 0, 127);
imagefill($image_resized, 0, 0, $color);
imagesavealpha($image_resized, true);
}
}
imagecopyresampled($image_resized, $image, 0, 0, 0, 0, $final_width, $final_height, $width_old, $height_old);

# Taking care of original, if needed
if ( $delete_original ) {
if ( $use_linux_commands ) exec('rm '.$file);
else @unlink($file);
}
# Preparing a method of providing result
switch ( strtolower($output) ) {
case 'browser':
$mime = image_type_to_mime_type($info[2]);
header("Content-type: $mime");
$output = NULL;
break;
case 'file':
$output = $file;
break;
case 'return':
return $image_resized;
break;
default:
break;
}

# Writing image according to type to the output destination and image quality
switch ( $info[2] ) {
case IMAGETYPE_GIF: imagegif($image_resized, $output); break;
case IMAGETYPE_JPEG: imagejpeg($image_resized, $output, $quality); break;
case IMAGETYPE_PNG:
$quality = 9 - (int)((0.9*$quality)/10.0);
imagepng($image_resized, $output, $quality);
break;
default: return false;
}
return true;
}
function getSizeFile($url) {
if (substr($url,0,4)=='http') {
$x = array_change_key_case(get_headers($url, 1),CASE_LOWER);
if ( strcasecmp($x[0], 'HTTP/1.1 200 OK') != 0 ) { $x = $x['content-length'][1]; }
else { $x = $x['content-length']; }
}
else { $x = @filesize($url); }
return $x;
}
function file_size($size) {
$sizes = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
if ($size == 0) {
return('n/a');
} else {
return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $sizes[$i]);
}
}

//indicate which file to resize (can be any type jpg/png/gif/etc...)
$file = '¿øº»ÆÄÀϸí.È®ÀåÀÚ';

//indicate the path and name for the new resized file
$resizedFile = '¸®»çÀÌ¡µÇ¾î ÀúÀåµÉ °æ·Î/ÆÄÀϸí.È®ÀåÀÚ';

//call the function
resize_image($file ,"600" , "400", true , $resizedFile , false , false ,50 );

?>

ÀÌ°ÍÀÌ ±âº» ¸ðµâÀÔ´Ï´Ù.


 


 


 


 


 


 

 
¹øÈ£     ±Û Á¦ ¸ñ ÀÛ¼ºÀÏ ¹øÈ£     ±Û Á¦ ¸ñ ÀÛ¼ºÀÏ
3697 ¹Î³ëÃÑÇÏ°í °áº°ÇÑ Çö´ëÁß°ø¾÷ 01/15 3696 1¿ù 17ÀÏ ip 10¸í 01/17
3695 friend.swf 01/17 3694 hojuu_net ȸ¿ø°¡ÀÔ ¾ÆÀÌÇÇ 01/17
3693 ³²ÇÑÅ× ¹ÎÆó³ª ³¢Ä¡´Â °ÍµéÀÌ Ä«Æä¿¡¼­ °øºÎÇØ°®°í ¶Ç.. 01/18 3692 ¼ÒÇÁÆ®¿þ¾î¶õ°Ô ÀÏÀ̳â ÇÑ´Ù°í µÇ´Â°Ô ¾Æ´Ï´Ù... 01/18
3691 ±¹³» ¾ËÂ¥±â¾÷ ¿Ü±¹°è Ç°À¸·Î..µæÀΰ¡ ½ÇÀΰ¡ 01/19 3690 [re] ±¹³» ¾ËÂ¥±â¾÷ ¿Ü±¹°è Ç°À¸·Î..µæÀΰ¡ ½ÇÀΰ¡ 01/19
3689 °íÇØ»óµµ À̹ÌÁö ÀԷ¿¡ ´ëÇÑ Ã³¸®¹æ¹ý·Ð ¡± 01/20 3688 '¦»ç¶û' ¾ÈÇö¼ö-Ãß¼ºÈÆ, Á¶±¹ÀÌ ³»Ä£ ºñ¿îÀÇ ÃµÀç 01/20
3687 ¸íµ¿ ÀÓ´ë·á Æøµî..'50³â ¸ÀÁý'µµ Æó¾÷ 01/21 3686 ¼úÃŬ°í Çʸ² ²«²¸´Ù´Â 뇸³âµé Ä¡¸ÅÈ®·ü ´ç÷ 01/21
3685 ¿©Áß°í»ý ÇÇÆø𵨠½ÃÄÑÁشٴõ´Ï..´©µå »çÁø ÃÔ¿µ 01/22 3684 chu±ØÈ÷ ÀϺΰí ÀÚ±â ÁÖº¯Àº ¾È ±×·¯°í ³¢¸®³¢¸® ³í´Ù.. 01/22
3683 µ¶¸³±º°ú ÂÊ»¡±ºÀÇ Å׸£¸®½ºÆ®ÀÇ »ó°ü°ü°è 01/22 3682 ½Ö¿ë Àεµ 01/23
3681 ÇǾƴϽºÆ®°¡ ²ÞÀÎ µþ°ú °í¹ÎÀÎ ¾Æºü.. 01/24 3680 ¾Æº£ÀÇ 'ñéìí Ãæµ¹°¡´É¼º' ¾ð±Þ¿¡ ¿Ü½Åµé °ü½É 01/24
3679 ¹Î½ÉÆÇ´Ü ´É·Â¿¡ ¹®Á¦°¡ ½É°¢¼º 01/25 3678 frozen 01/25
3677 http://f64-003.cafe24.com/WebMysql/index.php?db=gg.. 01/25 3676 ±â¼úÀ̹Π¹× È£ÁÖ itÂÊ 01/25
3675 Ŭ¶ó¿ìµå¿Í USB 01/25 3674 ÁÖ·Ê ¾ø´Â °áÈ¥½Ä¿¡¼­ »çȸÀÚ°¡ ²À ¾Ë¾ÆµÎ¾î¾ß ÇÒ °Íµé.. 01/25
3673 hh 01/26 3672 Çѱ¹¿¡¼­ ¾Æ¹«°Íµµ ¸ð¸£°í À¯Çпø, ¾îÇпø µîÀÇ ¼Ò°³.. 01/26
3671 ¹Ð¾çž Àü·ÂÀº °á±¹ ¼­¿ïÁö¿ª¿¡ Àü±â¸¦ °ø±ÞÇϱâ À§ÇØ.. 01/26 3670 º¸À̽ºÇǽ̡¤½ºÆÔ¹®ÀÚ ¿¬³» Àü¸é Â÷´ÜµÈ´Ù 01/27
3669 ¿ìÁÖ°ü±¤¼±¿¡ Áß±¹ÀΠž½ÂÀº ±ÝÁö 01/27 3668 ¿ìÁÖ°ü±¤¼±¿¡ Áß±¹ÀΠž½ÂÀº ±ÝÁö 01/27
3667 °æ»óÈ£³² °æÁ¦ÀûÂ÷º° 01/27 3666 ¾Æ ÁÖ ÁÁÀº ¼Ò½º ½ÎÀÌÆ® ¹ß°ß 01/27
3665 ¼º¾Ç°ú ±â¾Ç mmmm.. 01/25 3664 È­Çй°ÁúÀÇ À¯Çؼº¿¡ ´ëÇØ 01/29
3663 ¸¶¶óÅæ ¶Û¶§ À¯¸®¿¡ ¿À¸¥ÂÊ ¹ß°¡¶ô ÇÑ°³ ±æ¸®´Ù 01/29 3662 »ç»ó´©°¢ - Þã߾קÊÈ ¸ð·¡ À§¿¡ ¼¼¿î ´©°¢À̶ó´Â ¶æÀ¸.. 01/29
3661 ¿ï»ê¾ß±¸Àå NC±¸´Ü À¯Ä¡¿¡ ´ëÇؼ­ 01/30 3660 ¿Í½Å»ó´ã èÂãïßÄÓÅ 01/30
3659 ¹Ð¾ç ¿øÀü Àü±â½Ã¼³Àº ¼­¿ïÁö¿ªÀ¸·Î 01/31 3658 µ¶¸³Áغñ¸¦ ÇÒ °ÍÀΰ¡ÀÇ ¾çÀÚÅÃÀÏ(å»íº÷Éìé) 01/31
3657 ¸ðÅä·Î¶ó ÀμöÇÑ ·¹³ë¹öÀÇ ¼À¹ý 01/31 3656 ¸ÆºÏ °íÀÇ °æ¸Å°¡ Á¶ÀÛÇÑ뇸 02/01
3655 ¼³. ÃáÁ¦ Ãß¼®. ÁßÃßÁö¿¡. Áß±¹¿¡¼­ Çѱ¹À¸·Î 02/02 3654 Ãʱâ´Â Ç°ÁúÀÛ¿ë Èıâ´Â ÆòÁØÈ­·Î ¼ÒÀå¿ëÀÌ ¾Æ´Ñ ¼Ò¸ð.. 02/02
3653 쪾ºü¸®´Â µ¿Çغ´±â ÀúÁö ·Îºñ Àü¸ð "»ó»ó ÃÊ¿ù.. 02/02 3652 ¿äÁþ²¯ º¸Áö ²Ã¸®´Âµ¥·Î »ì¾Æ³ëÄÚ 02/02
3651 ¸Ö¸® Àִ ģ±¸¸¦ ÀÌ¿ëÇؼ­ °¡±îÀÌ ÀÖ´Â ÀûÀ» ÃÄ¾ß ÇÏ.. 02/03 3650 °íÇзÂÈ­¿¡ µû¶ó ´ëÇÐÀ» ³ª¿À°íµµ °æÁ¦È°µ¿À» ÇÏÁö ¾Ê.. 02/03
3649 쪾ºü¸®´Â µ¿Çغ´±â ÀúÁö ·Îºñ Àü¸ð "»ó»ó ÃÊ¿ù.. 02/02 3648 È£ÁÖ¿¡ °¡´Âµ¥ ¼Ò±Ý»ç¸· 02/02
1,,,41424344454647484950,,,122

ȸ¿ø°¡ÀÔ £ü ºñ¹Ð¹øÈ£ ã±â






°æºÏ °æÁֽà ³Ê°ÅÁýµ¿(ÁÖ)°æÁÖ°ÔÀÓ˜Þ
TEL:000-000-0000 / FAX:000-000-0000 / »ç¾÷ÀÚµî·Ï¹øÈ£:000-00-0000