Source for file rainImage.php
Documentation is available at rainImage.php
* @author http://cafen.net (outmind@cafen.net)
* text_y ¸¶Áö¸· TEXT YÁÂÇ¥
* text_y ¸¶Áö¸· TEXT YÁÂÇ¥
function rainImage($destWidth =
0, $destHeight =
0) {
if ($destWidth >
0 &&
$destHeight >
0)
$this->img =
$this->getImg($destWidth, $destHeight);
* ±âº» ÀÛ¾÷ °ø°£ °¡Á®¿À±â
* @return String base Root dir
* @return resource BufferedImage
function getImg($w, $h,$with_transparent =
false){
$white =
$this -> getColor($img, '#005282');
* @param String À̹ÌÁö ÆÄÀϸí
* @param String À̹ÌÁö °¡Á®¿À±â ½ÇÆÐ½Ã °¡Á®¿Ã À̹ÌÁö
* @return resource BufferedImage
function load($fileName, $onErrorimg =
""){
$src_im =
ImageCreateFromJPEG($this->getBaseRoot() .
$fileName);
$src_im =
ImageCreateFromGIF($this->getBaseRoot() .
$fileName);
$src_im =
ImageCreateFromPNG($this->getBaseRoot() .
$fileName);
$src_im =
$this->load($onErrorimg);
} else if ($onErrorimg !=
"")
$src_im =
$this->load($onErrorimg);
$src_im =
$this->getImg(100,100);
* @param String À̹ÌÁö ÆÄÀϸí
* @return resource BufferedImage
return $this->load('thumb/'.
$fileName.
'.png');
if ( $img_info[0] >
1024 ||
$img_info[1] >
1024) {
$img =
$this->load($fileName);
if ($this->save('thumb/'.
$fileName.
'.png')) {
$fm->add('thumb/'.
$fileName.
'.png');
return $this->load($fileName, "imgstyle/img_error.jpg");
return $this->load($fileName, "imgstyle/img_error.jpg");
* @param Int °¡·Î¼¼·Î ºñÀ²
* @param Int ±âÁØÀ§Ä¡ (0 : Á»ó´Ü, 1: Áß°£»ó´Ü, 2: ¿ì»ó´Ü, 3 : ÁÂÁß°£, 4 : Áß°£Áß°£, 5 : ¿ìÁß°£, 6 : ÁÂÇÏ´Ü, 7 : Áß°£ÇÏ´Ü, 8: ¿ìÇÏ´Ü)
* @return resource BufferedImage
function trim($img, $rate, $pos){
$tw =
round($oh *
$rate);
$th =
round($ow /
$rate);
$padding_x =
$padding_y =
0;
$padding_x =
round(($ow -
$tw)/
2);
$padding_x =
($ow -
$tw);
$padding_y =
round(($oh -
$th)/
2);
$padding_x =
round(($ow -
$tw)/
2);
$padding_y =
round(($oh -
$th)/
2);
$padding_y =
round(($oh -
$th)/
2);
$padding_x =
round(($ow -
$tw)/
2);
return $this->getSubimage($img,$padding_x,$padding_y,$tw,$th);
* @param resource ´ë»ó À̹ÌÁö
* @param Boolean Åõ¸í¼³Á¤¿©ºÎ
* @return resource BufferedImage
function getSubimage($img, $x, $y, $w, $h, $with_transparent =
false) {
$base_img =
$this->getImg($w, $h, $with_transparent);
imagecopy ($base_img, $img, 0, 0, $x, $y, $w, $h);
* ¼¶³×ÀÏ À̹ÌÁö ¸¸µé±â thumb/À̹ÌÁöÆÄÀϰæ·Î¸í_À̹ÌÁöÈ¿°ú.png
* F([a-z]+)([0-9]+)([MDT])S=(.+)= : 1 ÇÁ·¹ÀÓÀû¿ë (base, box, cap, cross, dashed, rain, saw, shadow, shasowbox)
* F([a-z]+)([0-9]+)([MDT])S=(.+)= : 2 ÇÁ·¹ÀÓ ¿©¹é
* F([a-z]+)([0-9]+)([MDT])S=(.+)= : 3 »çÁø ÃÔ¿µÁ¤º¸( M : »çÁø±â±âÁ¾, D:ÃÔ¿µÀÏÀÚ, T : ³ëÃâÁ¤º¸)
* F([a-z]+)([0-9]+)([MDT])S=(.+)= : 4 »çÁø½ÎÀÎÃß°¡
* R[0-3] : »çÁøÈ¸Àü [0 : ÀÚµ¿È¸Àü, 1: 90µµ, 2: 180µµ, 3: 270 µµ]
* M([0-9]+) : ÀåÃà ÃÖ´ë±æÀÌ
* T([0-9]+) : »çÁø Æ®¸²¹Ö, 100À» ±âÁØÀ¸·Î 100 ÀÌÇÏ´Â ¼¼·Î°¡ Å«»çÁø, 100 ÀÌ»óÀº °¡·Î°¡ Å«»çÁø 50 ÀÇ °æ¿ì °¡·Î/¼¼·Î ÀÌ 0.5 À» ¶æÇÔ
* B([0-9]+) : ºí·¯ ¹× »þÆÝ È¿°ú 10À» ±âÁØÀ¸·Î 10 ÀÌÇÏ´Â ºí·¯, 10 ÀÌ»óÀº »çÆÝ
* S([0-9]+) : »þÆÝ È¿°ú(¹Ì»ç¿ë¿¹Á¤)
* E([0-9]+) : ¿¡Áö È¿°ú(¼ýÀÚ°¡ Ŭ¼ö·Ï ¼±ÀÌ ºÐ¸íÇÔ)
* W([0-9]+) : ÈÀÌÆ® ¹ß¶õ½º (100 À» ±âÁØÀ¸·Î 100 ÀÌÇÏ´Â ¾îµÓ°Ô 100 ÀÌ»óÀº ¹à°Ô
* C([0-9]+) : ÄÜÆ®¶ó½ºÆ® (100 À» ±âÁØÀ¸·Î 100 ÀÌÇÏ´Â ¼±¸íÇÏ°Ô 100 ÀÌ»óÀº ¸ðÈ£ÇϰÔ
* @param String ¼¶³×ÀÏ ¸í
* @return Boolean ¼º°ø¿©ºÎ
$img_name =
$imgeffect =
$frameeffect =
$skineffect =
$img_type =
"";
if ($render_server !=
'') {
$tmp_filename =
$remotefile->remote_Copy($render_server.
"thumb/".
$fileName, "junk/", "tmp");
$tmp_filename =
$remotefile->remote_Copy($render_server.
"thumb/".
$fileName, "junk/", "tmp");
if (rainUtil::find("^thumb/(.+)_([=a-zA-Z0-9_]+)\.(png|jpg|gif)", $fileName,&$reg) ||
rainUtil::find("^(.+)_([=a-zA-Z0-9_]+)\.(png|jpg|gif)", $fileName, &$reg)) {
} else if (rainUtil::find("(.+)(F[a-z]+[0-9]+.+)", $imgeffect, &$reg)) {
$imgeffect =
rainUtil::replace("R0", "R" .
$exif->getRotate(), $imgeffect);
$img =
$this->resize($img, 1024);
} else if ($frameeffect !=
"") {
if ($this->save($fileName, $img_type)) {
* ¼¶³×ÀÏ À̹ÌÁö ¸¸µé°í À¥À¸·Î Àü¼Û
* @param String ¼¶³×ÀÏ ¸í
* F([a-z]+)([0-9]+)([MDT])[SB]=(.+)= : 1 ÇÁ·¹ÀÓÀû¿ë (base, box, cap, cross, dashed, rain, saw, shadow, shasowbox)
* F([a-z]+)([0-9]+)([MDT])[SB]=(.+)= : 2 ÇÁ·¹ÀÓ ¿©¹é
* F([a-z]+)([0-9]+)([MDT])[SB]=(.+)= : 3 »çÁø ÃÔ¿µÁ¤º¸( M : »çÁø±â±âÁ¾, D:ÃÔ¿µÀÏÀÚ, T : ³ëÃâÁ¤º¸)
* F([a-z]+)([0-9]+)([MDT])[SB]=(.+)= : 4 »çÁø½ÎÀÎÃß°¡ S : °ü¸®ÀÚ°¡ ÁöÁ¤¼º ¾Õ÷ÀÚ µÚ÷ÀÚ Ãß°¡, B: base64 ·Î encode ½ÃŲ ¹®ÀÚ¿
* @param resource ´ë»ó À̹ÌÁö
* @param String ÇÁ·¹ÀÓÈ¿°ú
* @param rainExif »çÁøÀÇ Exif Á¤º¸
* @return resource BufferedImage
$img_style =
$sign =
$pic_modelinfo =
$pic_dateinfo =
$pic_takeinfo =
"";
$addheight =
$addwidth =
$img_padding =
0;
$addwidth =
$addheight +=
$img_padding *
2;
else if (rainUtil::find("B=([a-zA-Z0-9=]+)=", $effect, &$reg))
$pic_modelinfo =
$exif->getModel();
if ($pic_modelinfo !=
"")
$pic_dateinfo =
$exif->getDatetime();
$pic_takeinfo =
$exif->getInfo();
$frmWidth =
imagesx($img) +
$addwidth ;
$frmHeight =
imagesy($img) +
$addheight;
$this->img =
$this->getImg($frmWidth, $frmHeight);
if ($img_style !=
"" &&
$img_style !=
"none")
$this->setImg($img, $img_padding);
if ($pic_modelinfo !=
"")
$this->setText($pic_modelinfo, $fontcolor);
$this->setText($pic_takeinfo, $fontcolor);
$this->setText($pic_dateinfo, $fontcolor);
* K([a-z]+)([0-9]+)([MDT])[SB]=(.+)= : 1 ÇÁ·¹ÀÓÀû¿ë (base, box, cap, cross, dashed, rain, saw, shadow, shasowbox)
* K([a-z]+)([0-9]+)([MDT])[SB]=(.+)= : 2 ÇÁ·¹ÀÓ ¿©¹é
* K([a-z]+)([0-9]+)([MDT])[SB]=(.+)= : 3 »çÁø ÃÔ¿µÁ¤º¸( M : »çÁø±â±âÁ¾, D:ÃÔ¿µÀÏÀÚ, T : ³ëÃâÁ¤º¸)
* K([a-z]+)([0-9]+)([MDT])[SB]=(.+)= : 4 »çÁø½ÎÀÎÃß°¡ S : °ü¸®ÀÚ°¡ ÁöÁ¤¼º ¾Õ÷ÀÚ µÚ÷ÀÚ Ãß°¡, B: base64 ·Î encode ½ÃŲ ¹®ÀÚ¿
* @param resource ´ë»ó À̹ÌÁö
* @param String ÇÁ·¹ÀÓÈ¿°ú
* @param rainExif »çÁøÀÇ Exif Á¤º¸
* @return resource BufferedImage
$img_style =
$sign =
$pic_modelinfo =
$pic_dateinfo =
$pic_takeinfo =
"";
else if (rainUtil::find("B=([a-zA-Z0-9=]+)=", $effect, &$reg))
$pic_modelinfo =
$exif->getModel();
$pic_dateinfo =
$exif->getDatetime();
$pic_takeinfo =
$exif->getInfo();
if ($pic_modelinfo !=
'')
$text[] =
$pic_modelinfo;
$img =
$this->addText($img, $text, 5);
$img =
$this->setSkin($img, $img_style);
* À̹ÌÁö ½ÎÀÎ ¹®ÀÚ °¡Á®¿À±â
* @param String ±âº» ¹®ÀÚ
* @return String À̹ÌÁö½ÎÀÎ
* R[0-3] : »çÁøÈ¸Àü [0 : ÀÚµ¿È¸Àü, 1: 90µµ, 2: 180µµ, 3: 270 µµ]
* M([0-9]+) : ÀåÃà ÃÖ´ë±æÀÌ
* T([0-9]+) : »çÁø Æ®¸²¹Ö, 100À» ±âÁØÀ¸·Î 100 ÀÌÇÏ´Â ¼¼·Î°¡ Å«»çÁø, 100 ÀÌ»óÀº °¡·Î°¡ Å«»çÁø 50 ÀÇ °æ¿ì °¡·Î/¼¼·Î ÀÌ 0.5 À» ¶æÇÔ
* B([0-9]+) : ºí·¯ ¹× »þÆÝ È¿°ú 10À» ±âÁØÀ¸·Î 10 ÀÌÇÏ´Â ºí·¯, 10 ÀÌ»óÀº »çÆÝ
* S([0-9]+) : »þÆÝ È¿°ú(¹Ì»ç¿ë¿¹Á¤)
* E([0-9]+) : ¿¡Áö È¿°ú(¼ýÀÚ°¡ Ŭ¼ö·Ï ¼±ÀÌ ºÐ¸íÇÔ)
* W([0-9]+) : ÈÀÌÆ® ¹ß¶õ½º (100 À» ±âÁØÀ¸·Î 100 ÀÌÇÏ´Â ¾îµÓ°Ô 100 ÀÌ»óÀº ¹à°Ô
* C([0-9]+) : ÄÜÆ®¶ó½ºÆ® (100 À» ±âÁØÀ¸·Î 100 ÀÌÇÏ´Â ¼±¸íÇÏ°Ô 100 ÀÌ»óÀº ¸ðÈ£ÇϰÔ
* @param resource ´ë»ó À̹ÌÁö
* @param String À̹ÌÁö È¿°ú
* @return resource BufferedImage
if ($sat !=
100 ||
$hue !=
0)
$img =
$this->effectHSB($img, $hue,$sat ,$bri);
* ÇÔ¼ö »ç¿ë°¡´É¿©ºÎ(imagefilter)
* @return Boolean »ç¿ë°¡´É¿©ºÎ
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
if ($rate ==
0) return $img;
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
if ($rate ==
0) return $img;
$rate =
max(-
255, min($rate, 255));
imagefilter($img, IMG_FILTER_COLORIZE, $rate , $rate, $rate);
* TrueColor to paletteColor
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
ImageTrueColorToPalette( $img, false, $ncolors );
* paletteColor to TrueColor
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
$colors_handle =
ImageCreateTrueColor( $width, $height );
ImageCopy( $colors_handle, $img, 0, 0, 0, 0, $width, $height);
* @param resource ´ë»ó À̹ÌÁö
* @param Int äµµÂüÁ¶ºñÀ²
* @param Boolean ºü¸¥ ·£µå¸µ»ç¿ë¿©ºÎ
* @return resource BufferedImage
function effectHSB($img, $hue_rate =
0, $sat_rate =
100, $bri_rate =
100, $use_speed =
false){
$sat_rate =
$sat_rate -
100;
$bri_rate =
$bri_rate -
100;
if ($sat_rate ==
0 &&
$hue_rate ==
0 &&
$bri_rate ==
0) return $img;
$float_sat =
$sat_rate/
100;
$float_bri =
$bri_rate/
100;
for($i =
0 ; $i <
$color_len; $i++
) {
list
($hue,$sat,$bri) =
$this->rgb2hsv($rgb[red],$rgb[green],$rgb[blue]);
list
($nred,$ngreen,$nblue) =
$this->hsv2rgb($hue +
$hue_rate,$sat +
$sat*
$float_sat,$bri +
$bri*
$float_bri);
for ($x =
0; $x <
$imagex; $x++
) {
for ($y =
0; $y <
$imagey; $y++
) {
$red =
($rgb >>
16) & 255;
$green =
($rgb >>
8) & 255;
list
($hue,$sat,$bri) =
$this->rgb2hsv($red,$green,$blue);
list
($nred,$ngreen,$nblue) =
$this->hsv2rgb($hue +
$hue_rate,$sat +
$sat*
$float_sat,$bri +
$bri*
$float_bri);
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
if ($rate ==
0) return $img;
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
if ($rate ==
0) return $img;
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
* @param resource ´ë»ó À̹ÌÁö
* @param Int ´ë»ó ¹à±â(±âº» 100, 100 ÀÌÇÏ : ¾îµÓ°Ô, 100 ÀÌ»ó : ¹à°Ô)
* @return resource BufferedImage
* @param resource ´ë»ó À̹ÌÁö
* @param Int ´ë»ó ´ëºñ(±âº» 100, 100 ÀÌÇÏ : °ÇϰÔ, 100 ÀÌ»ó : ¾àÇϰÔ)
* @return resource BufferedImage
* ¾ÈÀü»ö»ó °¡Á®¿À±â(0-255)
return max(0, min(255, $rgb));
* @return Array (Àû»ö, ±×¸°, ºí·ç)
$hex_r =
$hex_g =
$hex_b =
"";
$hex_r =
substr($hexcolor,0,2);
$hex_g =
substr($hexcolor,2,2);
$hex_b =
substr($hexcolor,4,2);
$hex_r =
substr($hexcolor,1,2);
$hex_g =
substr($hexcolor,3,2);
$hex_b =
substr($hexcolor,5,2);
* @return Array (hue, saturation, brightness)
$delta=
$max-
min($r,$g,$b);
else $S=
$delta/
$max*
100;
return $this->base_rgb2hue[$r][$g][$b] =
Array($H?
$H:
0,$S?
$S:
0,($max/
255)*
100);
* @param Int saturation °ª
* @param Int brightness °ª
* @return Array (red, green, blue)
$H=
6*
$H; $F=
$H-
floor($H);
$A=
round(255*
$V*
(1.0-
$S));
$B=
round(255*
$V*
(1.0-
($S*
$F)));
$C=
round(255*
$V*
(1.0-
($S*
(1.0-
$F))));
case 0:
$R=
$V; $G=
$C; $B=
$A; break;
case 1:
$R=
$B; $G=
$V; $B=
$A; break;
case 2:
$R=
$A; $G=
$V; $B=
$C; break;
case 3:
$R=
$A; $G=
$B; $B=
$V; break;
case 4:
$R=
$C; $G=
$A; $B=
$V; break;
case 5:
$R=
$V; $G=
$A; $B=
$B; break;
return $this->base_hue2rgb[$h][$s][$v] =
Array($R?
$R:
0,$G?
$G:
0,$B?
$B:
0);
* @param resource ´ë»óÀ̹ÌÁö
function getColor($img, $hexcolor, $alpha =
0){
* Color À» ÀÎÅØ½º Ä®¶ó·Î º¯È¯
* @param resource ´ë»óÀ̹ÌÁö
* @param String ´ë»ó hex °ª
* ÁÖ¾îÁø À̹ÌÁö¸¦ ±âº»À̹ÌÁö¿¡ º¹»ç
* @param resource º¹»çÇÒ À̹ÌÁö
* @param Int º¹»çÇÒÀ̹ÌÁöÀÇ X ÁÂÇ¥
* @param Int º¹»çÇÒÀ̹ÌÁöÀÇ Y ÁÂÇ¥
* @param Int º¹»çÇÒÀ̹ÌÁöÀÇ °¡·ÎÅ©±â
* @param Int º¹»çÇÒÀ̹ÌÁöÀÇ ¼¼·ÎÅ©±â
* @param Boolean ½º¸¶Æ¼º¹»ç»ç¿ë¿©ºÎ
function copy($img, $x, $y, $w =
0, $h =
0, $sx =
0, $sy =
0, $smart_copy =
false){
if ($w ==
0 ||
$h ==
0) {
$sx +=
($x +
$w -
$img_w);
$w -=
($x +
$w -
$img_w);
$sy +=
($y +
$h -
$img_h);
$h -=
($y +
$h -
$img_h);
* @param String ³ÖÀ» ¹®ÀÚ
* @param String ±Û¾¾ »ö»ó
function text($text, $x, $y, $hexcolor =
"#464646"){
* @param resource ´ë»óÀ̹ÌÁö
* @param Int ´ë»ó °¡·ÎÅ©±â
* @param Int ´ë»ó ¼¼·ÎÅ©±â
* @return resource BufferedImage
function resize($img, $w, $h =
0){
$h =
round($oh *
($w/
$ow));
$newimg =
$this->getImg($w,$h);
if ($this->checkFun("imagecopyresampled")) {
$newimg =
$this->getImg($w,$h);
ImageCopyResampled($newimg, $img, 0, 0, 0, 0, $w, $h, imagesx($img), imagesy($img));
* À̹ÌÁö Å©±âÁ¶Á¤(ÀåÃà ´ë»ó Á¶Á¤)
* @param resource ´ë»óÀ̹ÌÁö
* @param Int ÀåÃà ÃÖ´ëÅ©±â
* @return resource BufferedImage
if ($ow >
$max_size ||
$oh >
$max_size) {
$oh =
round($max_size /
$rate);
$ow =
round($max_size *
$rate);
$img =
$this->resize($img, $ow, $oh);
* @param resource ´ë»óÀ̹ÌÁö
* @param Int ´ë»ó°¡·ÎÅ©±â
* @param Int ´ë»ó¼¼·ÎÅ©±â
* @return resource BufferedImage
function fill($img, $w, $h){
$newimg =
$this->getImg($w,$h);
imagecopy($newimg, $img, $x, $y , 0, 0, $ow, $oh);
} while($y <=
$h +
$oh );
* À̹ÌÁö¿¡¼ ƯÁ¤¿µ¿ª°¡Á®¿À±â
* @param resource ´ë»óÀ̹ÌÁö
* @param Int ´ë»óÀ§Ä¡(1:Áß°£»ó, 2 : ÁÂÁß°£, 3 : ÇÏÁß°£, 4: ÁÂÁß°£,0 : Áß°£Áß°£)
* @param Int ´ë»ó°¡·ÎÅ©±â
* @param Int ´ë»ó¼¼·ÎÅ©±â
* @return resource BufferedImage
$newimg =
$this->getImg($w,$h);
return $this->fill($newimg, $w,$h);
* @param String ÇÁ·¹ÀÓÀ̸§
* @return resource BufferedImage
function loadFrame($frmName, $linecolor, $bgcolor){
$compiled_filename =
"imgstyle/compiled/" .
strtolower(rainUtil::replace("#", "", $bgcolor .
"_" .
$linecolor .
"_" .
$frmName .
"_main_php.png"));
return $this->load($compiled_filename);
$frmimg =
$this->load("imgstyle/" .
$frmName .
"_main.png");
$newimg =
$this->getImg($fw,$fh);
$bg =
$this->getColor($newimg,$bgcolor);
$line =
$this->getColor($newimg,$linecolor) ;
$trance =
$this->getColor($newimg,"#005283");
for($x =
0; $x <
$fw; $x++
) {
for($y =
0; $y <
$fh; $y++
) {
else if ($pixcolor ==
16777215)
* ÇöÀçÀÇ À̹ÌÁö¿¡ ÇÁ·¹ÀÓ ³Ö±â
* @param String ÇÁ·¹ÀÓÀ̸§
function setFrame($frmName, $lineColor =
"#464646", $bgColor =
"#FFFFFF"){
$frmimg =
$this->loadFrame($frmName, $lineColor, $bgColor);
$this->copy($frmimg, 0,0, 4,4, 0,0);
$this->copy($frmimg, $ow-
4,0,4,4,$fw-
4,0);
$this->copy($frmimg, 0,$oh-
4,4,4,0,$fh-
4);
$this->copy($frmimg, $ow-
4,$oh-
4,4,4,$fw-
4,$fh-
4);
* @param resource ´ë»óÀ̹ÌÁö
* @param Int ´ë»ó°¡·ÎÅ©±â
* @param Int ´ë»ó¼¼·ÎÅ©±â
* @param Int ¿øº»°¡·ÎÅ©±â
* @param Int ¿øº»¼¼·ÎÅ©±â
* @param Boolean °Á¦´Ã¸®±â »ç¿ë¿©ºÎ
* @return resource BufferedImage
function fillCopy($img, $ox, $oy, $ow, $oh, $sx, $sy, $sw, $sh, $stretch_mode =
0){
if ($stretch_mode ==
0) {
if ($ow ==
0 ||
$oh ==
0 ||
$sw ==
0 ||
$sh ==
0)
$x =
$y =
$tmp_width =
$tmp_height =
0;
if ($y <=
$sh ||
$x <=
$sw) {
if ($tg_width >
0 &&
$tg_height >
0)
* À̹ÌÁö¿¡ ¾ËÆÄ È¿°ú ÁÖ±â
* @param String ¹èÀ̹ÌÁö¸í
* @param String ¾ËÆÄ È¿°ú ¹æÇâ[S = 3¹æÇâ, SL= ÁÂÃøÇÏ´Ü, SR = ¿ìÃøÇÏ´Ü, SY = ÇÏ´Ü]
* @param String ¾ËÆÄ »ö»ó
* @return resource BufferedImage
function getColorAlpha($bg_img, $alpha_img, $bgcolor, $max_height =
0){
$bgimg =
$this -> load($bg_img);
if ($max_height >
0 &&
imagesy($bgimg) >
$max_height)
$alphaimg =
$this -> load('colorskin/bg_alpha.png');
$alphaimg =
$this -> load('colorskin/bg_alpha_xl.png');
$alphaimg =
$this -> load('colorskin/bg_alpha_xr.png');
$alphaimg =
$this -> load('colorskin/bg_alpha_y.png');
if ( $alphaimg !=
null) {
for($x =
0; $x <=
127; $x++
)
for($x =
0 ; $x <
$alpha_w ; $x++
) {
for($y =
0 ; $y <
$alpha_h; $y++
) {
imagesetpixel($alphaimg, $x, $y, $alpha_index[$alpha_color[alpha]]);
* @param String ÀÛ¾÷¿µ¿ª Æúµå¸í
* @param String ¹è°æÀ̹ÌÁö
* @return resource BufferedImage
function getColorSkin($skin_name, $color_match =
Array(), $width =
0, $height =
0, $base_dir =
'', $bg_img =
'', $bg_rate =
0){
$filename =
($skininfo['filename'] ==
'')?
$skin_name.
'.png' :
$skininfo['filename'];
$frm_img =
$this->load('colorskin/'.
$filename);
$prokey =
array("linecolor", "bgcolor","titlecolor","transcolor");
foreach($prokey as $key) {
if ($skininfo[$key] !=
'') {
$skin_color =
$skininfo[$key];
$rgb =
$this->hex2Int($skin_color);
if ($color_match[$key] !=
'') {
$tar_color[] =
Array ( 'red' =>
$rgb[0],'green' =>
$rgb[1],'blue' =>
$rgb[2] ,'alpha' =>
0 );
if (strtoupper($val) ==
'TRANSPARENT' ||
$val ==
'#005283') {
$src_color[] =
Array ( 'red' =>
0,'green' =>
0,'blue' =>
0 ,'alpha' =>
127);
$src_color[] =
Array ( 'red' =>
$rgb[0],'green' =>
$rgb[1],'blue' =>
$rgb[2] ,'alpha' =>
0 );
$lastcolor_is_transparent =
(!$skininfo['nottranscolor']) ?
true :
false;
if ($have_trans ||
$lastcolor_is_transparent) {
if ($trans_color_idx == -
1) {
$trans_color =
$this -> getColor($frm_img, '#005282');
$trans_color =
$this -> hex2Int('#005282');
imagecolorset($frm_img, $trans_color_idx, $trans_color[0],$trans_color[1],$trans_color[2]);
for ($i =
0 ; $i <
$len; $i++
) {
if ($trans_color_idx ==
$i) {
} else if (($key =
array_search($color, $tar_color)) !==
false) {
if ($src_color[$key] !=
$color ||
$src_color[$key]['alpha'] ==
127) {
if ($src_color[$key]['alpha'] ==
127) {
imagecolorset($frm_img, $i, $trans_color['red'],$trans_color['green'],$trans_color['blue']);
imagecolorset($frm_img, $i, $src_color[$key]['red'],$src_color[$key]['green'],$src_color[$key]['blue']);
if ($skininfo['img_mask'] !=
'') {
$mask_img =
$this->load('colorskin/'.
$skininfo['img_mask']);
// imagecopy($frm_img, $mask_img,0,0,0,0,imagesx($mask_img),imagesy($mask_img));
$prokey =
array("stretch_width", "stretch_height","pic_drawpt","extraspace");
list
($skininfo[$key.
'_0'], $skininfo[$key.
'_1'], $skininfo[$key.
'_2']) =
explode(' ',$skininfo[$key]);
$img_width =
$width +
$skininfo['extraspace_0'];
$img_height =
$height +
$skininfo['extraspace_1'];
if ($img_width <
$frm_width) $img_width =
$frm_width;
if ($img_height <
$frm_height) $img_height =
$frm_height;
if ($frm_width >=
$img_width &&
$frm_height >=
$img_height)
$this->img =
$this->getImg($img_width, $frm_height,true);
if ($frm_width >=
$img_width)
// $this->img = $this->getSubimage($frm_img, 0, 0, imagesx($frm_img),imagesy($frm_img), true);
$frm_w =
$skininfo['stretch_width_0'];
$img_h =
$frm_h =
$frm_height;
$this->copy($frm_img, $img_x, $img_y, $frm_w, $frm_h, $frm_x, $frm_y);
$frm_w =
$skininfo['stretch_width_1'];
$frm_x =
$skininfo['stretch_width_0'];
$img_w =
$img_width -
($frm_width -
$skininfo['stretch_width_1']);
$img_x =
$skininfo['stretch_width_0'];
$this->fillCopy($frm_img, $frm_x, $frm_y, $frm_w,$frm_h, $img_x, $img_y, $img_w, $img_h, $skininfo['stretch_width_2']);
$frm_w =
$img_w =
$frm_width -
($skininfo['stretch_width_0'] +
$skininfo['stretch_width_1']);
$this->copy($frm_img, $img_x, $img_y, $frm_w, $frm_h, $frm_x, $frm_y);
if ($frm_height >=
$img_height) {
$img_height =
$frm_height;
$this->img =
$this->getImg($img_width, $img_height,true);
$frm_h =
$skininfo['stretch_height_0'];
$img_w =
$frm_w =
$img_width;
$this->copy($frm_img, $img_x, $img_y, $img_width, $frm_h, $frm_x, $frm_y);
$frm_h =
$skininfo['stretch_height_1'];
$frm_y =
$skininfo['stretch_height_0'];
$img_h =
$img_height -
($frm_height -
$skininfo['stretch_height_1']);
$img_y =
$skininfo['stretch_height_0'];
$this->fillCopy($frm_img, $frm_x, $frm_y, $img_width,$frm_h, $img_x, $img_y, $img_width, $img_h, $skininfo['stretch_height_2']);
$frm_h =
$img_h =
$frm_height -
($skininfo['stretch_height_0'] +
$skininfo['stretch_height_1']);
$this->copy($frm_img, $img_x, $img_y, $img_width, $frm_h, $frm_x, $frm_y);
if ($bg_rate >
0 &&
$bg_img !=
'' &&
$bg_color !=
'') {
for($i =
0; $i <
35; $i++
) {
if ($skininfo['img'.
$i] !=
'') {
list
($x,$y, $w, $h,$img_name) =
explode(' ',$skininfo['img'.
$i]);
$w =
($w ==
0) ?
$img_width:
$w;
$h =
($h ==
0) ?
$img_height:
$h;
$x =
($x <
0) ?
$img_width+
$x:
$x;
$y =
($y <
0) ?
$img_height+
$y:
$y;
$white =
$this -> getColor($tmp2, '#005282');
* @param resource ¼Ò½º À̹ÌÁö
* @param resource ¸¶½ºÅ© À̹ÌÁö
* @param String ¸¶½ºÅ© »ö»ó
* @return resource BufferedImage
$tmp_color =
'#ff0000'; // #1f4e17;
$tmp_img =
$this->getImg($img_width, $img_height);
$white =
$this -> getColor($tmp_img, $tmp_color);
imagecopy($tmp_img, $mask_img, 0,0,0,0,$img_width, $img_height);
$tmp_rgb =
$this->hex2Int($tmp_color);
$rgb =
$this->hex2Int($mask_color);
for ($i =
0; $i <
$len; $i++
) {
if (round($color['red']/
$color_rate) ==
round($rgb[0]/
$color_rate) &&
round($color['green']/
$color_rate) ==
round($rgb[1]/
$color_rate) &&
round($color['blue']/
$color_rate) ==
round($rgb[2]/
$color_rate))
imagecolorset($mask_img, $i, $tmp_rgb[0],$tmp_rgb[2],$tmp_rgb[2]);
$tmp_img =
$this->fill($source_img,$img_width, $img_height);
imagecopy($tmp_img,$mask_img, 0,0,0,0,$img_width, $img_height);
* ÇÁ·¹ÀÓ Á¤º¸ XML °¡Á®¿À±â
* @return String ÇÁ·¹ÀÓ Á¤º¸ XML
$bgtable =
$this->load("skin/1320x1320.png");
foreach($skinmaster-> propertyNames() as $skin_key) {
list
($skin_name, $skin_seqn) =
explode(' ',$skinmaster->get($skin_key));
$skin_seqn =
intval($skin_seqn);
$fileName =
"skin/120x120bg.png_K".
$skin_no.
".png";
$img_name =
"skin/icon/".
$skin_no.
".png";
if ($skin_seqn >
0 &&
$skin_seqn <
100) {
$x =
($skin_seqn %
10) *
120 +
60;
$y =
floor($skin_seqn/
10)*
120 +
60;
imagecopy($bgtable, $tmp, $x,$y, 0,0, 110,110);
$xml .=
"\t<name><![CDATA[".
$skin_no.
"]]></name>\r\n";
$xml .=
"\t<seqn><![CDATA[".
$skin_seqn.
"]]></seqn>\r\n";
$xml .=
"\t<icon><![CDATA[icon_".
$skin_no.
".png]]></icon>\r\n";
$xml .=
"\t<description><![CDATA[".
$skininfo->get('title').
"]]></description>\r\n";
return $file->fileLoader("skin/skin_editorinfo.xml");
* @return Array ÇÁ·¹ÀÓÁ¤º¸
list
($frmName) =
explode(' ',$masterinfo['s'.
$frmName]);
if ($skininfo['file'] !=
'')
$skininfo['skinimg']=
$frmName.
".png";
$prokey =
array("extraspace","upleft", "upmid", "upright", "ctleft", "ctright", "btleft", "btmid", "btright", "pic_drawpt");
list
($skininfo[$key.
'_0'], $skininfo[$key.
'_1']) =
explode(' ',$skininfo[$key]);
* @param resource ´ë»ó À̹ÌÁö
* @param Array Ãß°¡ÇÒ ¹®ÀÚ Á¤º¸
* @param Int °¡·Î¼¼·Î ¿©¹é
* @return resource BufferedImage
function addText($src_img, $text =
Array(), $padding =
5){
$add_height =
count($text) *
15 +
$padding *
2;
$img_height =
imagesy($src_img) +
$add_height;
$img =
$this->getImg($img_width, $img_height);
$white =
$this -> getColor($img, '#FFFFFF');
$black =
$this -> getColor($img, '#464646');
$y =
imagesy($src_img) +
$padding -
15;
$base_x =
$img_width -
$padding;
* @param resource ´ë»ó À̹ÌÁö
* @param String ¾×ÀÚ½ºÅ²¸í
* @return resource BufferedImage
if ($skininfo['skinimg'] ==
'')
$frm_img =
$this->load('skin/'.
$skininfo['skinimg']);
if ($skininfo['type'] !=
'transparent_fit') {
if ($img_width +
$skininfo['extraspace_0'] <
imagesx($frm_img) ||
$img_height +
$skininfo['extraspace_1'] <
imagesy($frm_img)) {
if ((imagesx($frm_img) -
$skininfo['extraspace_0']) >
0 &&
(imagesy($frm_img) -
$skininfo['extraspace_1']) >
0)
$resize_rate =
min($img_width/
(imagesx($frm_img) -
$skininfo['extraspace_0']), $img_height/
(imagesy($frm_img) -
$skininfo['extraspace_1']));
if ($resize_rate >
0 &&
$resize_rate !=
1) {
$frm_width =
$img_width +
$skininfo['extraspace_0'] ;
$frm_height =
$img_height +
$skininfo['extraspace_1'];
$this->img =
$this->getImg($frm_width, $frm_height, true);
if ($skininfo['type'] ==
'transparent_fit') {
if ($skininfo['type'] !=
'')
$this->copy($img, $skininfo['pic_drawpt_0'], $skininfo['pic_drawpt_1']);
if ($skininfo['upleft_0'] >
0 &&
$skininfo['upleft_1'] >
0)
$this->copy($frm_img, $img_x, $img_y, $skininfo['upleft_0'], $skininfo['upleft_1'], $frm_x, $frm_y);
$frm_x +=
$skininfo['upleft_0'];
$img_x +=
$skininfo['upleft_0'];
$mid_width =
$frm_width -
$skininfo['upleft_0'] -
$skininfo['upright_0'];
if ($skininfo['upmid_0'] >
0 &&
$skininfo['upmid_1'] >
0)
$this->fillCopy($frm_img, $frm_x, $frm_y, $skininfo['upmid_0'],$skininfo['upmid_1'], $img_x, $img_y, $mid_width, $skininfo['upmid_1'], $skininfo['stretch_mode']);
$frm_x +=
$skininfo['upmid_0'];
if ($skininfo['upright_0'] >
0 &&
$skininfo['upright_1'] >
0)
$this->copy($frm_img, $img_x, $img_y, $skininfo['upright_0'], $skininfo['upright_1'], $frm_x, $frm_y, true);
$frm_y +=
$skininfo['upleft_1'];
$img_y +=
$skininfo['upleft_1'];
$mid_height =
$frm_height -
$skininfo['upleft_1'] -
$skininfo['btleft_1'];
if ($skininfo['ctleft_1'] >
0 &&
$skininfo['ctleft_1'] >
0)
$this->fillCopy($frm_img, $frm_x, $frm_y, $skininfo['ctleft_0'],$skininfo['ctleft_1'], $img_x, $img_y, $skininfo['ctleft_0'],$mid_height, $skininfo['stretch_mode']);
$frm_x +=
$skininfo['ctleft_0'] +
$skininfo['upmid_0'] ;
$img_x +=
$skininfo['ctleft_0']+
$mid_width;
if ($skininfo['ctright_1'] >
0 &&
$skininfo['ctright_1'] >
0)
$this->fillCopy($frm_img, $frm_x, $frm_y, $skininfo['ctright_0'],$skininfo['ctright_1'], $img_x, $img_y, $skininfo['ctright_0'],$mid_height, $skininfo['stretch_mode']);
$frm_y +=
$skininfo['ctleft_1'];
if ($skininfo['btleft_0'] >
0 &&
$skininfo['btleft_1'] >
0)
$this->copy($frm_img, $img_x, $img_y, $skininfo['btleft_0'], $skininfo['btleft_1'], $frm_x, $frm_y, true);
$frm_x +=
$skininfo['btleft_0'];
$img_x +=
$skininfo['btleft_0'];
$mid_width =
$frm_width -
$skininfo['btleft_0'] -
$skininfo['btright_0'];
if ($skininfo['btmid_0'] >
0 &&
$skininfo['btmid_1'] >
0)
$this->fillCopy($frm_img, $frm_x, $frm_y, $skininfo['btmid_0'],$skininfo['btmid_1'], $img_x, $img_y, $mid_width, $skininfo['btmid_1'], $skininfo['stretch_mode']);
$frm_x +=
$skininfo['btmid_0'];
if ($skininfo['btright_0'] >
0 &&
$skininfo['btright_1'] >
0)
$this->copy($frm_img, $img_x, $img_y, $skininfo['btright_0'], $skininfo['btright_1'], $frm_x, $frm_y,true);
if ($skininfo['type'] !=
'transparent_fit') {
if ($original_img ==
null)
if ($resize_rate >
0 &&
$resize_rate !=
1)
if ($skininfo['type'] ==
'')
$this->copy($original_img, $skininfo['pic_drawpt_0']*
$resize_rate, $skininfo['pic_drawpt_1']*
$resize_rate);
* ÇöÀçÀÇ À̹ÌÁö¿¡ º¹»ç ³Ö±â
* @param resource º¹»çÇÒÀ̹ÌÁö
* @param Int °¡·Î¼¼·Î ¿©¹é
function setImg($img, $padding){
$img =
$this->resize($img, $ow);
$this->copy($img, $padding, $padding);
* ÇöÀçÀÇ À̹ÌÁö¿¡ ¹®ÀÚ ³Ö±â
* @param String ¹®ÀÚ »ö»ó
function setText($text, $hexcolor){
* @param resource ´ë»ó À̹ÌÁö
* @param Int ȸÀü°¢µµ(1: 90µµ, 2: 180µµ, 3: 270µµ, 0 :ȸÀü¾øÀ½)
* @return resource BufferedImage
$img =
$this->resize($img, 1024);
* À̹ÌÁö¿¡ ÇÁ·¹ÀÓÃß°¡Çϱâ
* @param String À̹ÌÁöÆÄÀϸí
* @param Boolean ÀÚµ¿È¸Àü¿©ºÎ
* @param String À̹ÌÁö½ÎÀÎ
* @param Boolean »çÁøÃÔ¿µÁ¤º¸ ³Ö±â¿©ºÎ
function makeFrame($file_name, $img_style, $max_width, $auto_rotate, $bgcolor, $linecolor, $fontcolor, $sign , $add_picinfo, $padding_value) {
$img =
$this->load($file_name);
if ($add_picinfo ||
$auto_rotate) {
$photo_model =
$exif->getModel();
if ($photo_model !=
"") {
$photo_info =
$exif->getInfo();
$img =
$this->setRotate($img, $exif->getRotate());
$img =
$this->resize($img, $max_width);
$frmWidth =
imagesx($img) +
$padding_value *
2;
$frmHeight =
imagesy($img) +
$padding_value *
2 +
$addheight;
$this->img =
$this->getImg($frmWidth, $frmHeight);
$this->setImg($img, $padding_value);
$this->setText($photo_model, $fontcolor);
$this->setText($photo_info, $fontcolor);
* ÆÄÀÏ¸í¿¡¼ È®ÀåÀÚ °¡Á®¿À±â
* @param String ´ë»óÆÄÀϸí
* @param Boolean ÀÚ¹ÙÇü À̹ÌÁö¿©ºÎ
* @return String ÆÄÀÏÈ®ÀåÀÚ
function name2Ext($fileName, $java_img =
false) {
$tar_file_extension =
"";
if (ereg("\.([^\.]+)$", $fileName, $tmp_reg))
$tar_file_extension =
"tmp";
if ($java_img &&
$tar_file_extension ==
'gif')
$tar_file_extension =
'png';
return $tar_file_extension;
* ÇöÀçÀÇ À̹ÌÁö¸¦ ÁÖ¾îÁø ÆÄÀϸíÀ¸·Î ÀúÀå
* @param String ´ë»óÆÄÀϸí
* @return Boolean ¼º°ø¿©ºÎ
function save($fileName, $img_type =
'png') {
$fileext =
($img_type ==
'')?
$this->name2Ext($fileName, true) :
$img_type;
* ÇöÀçÀÇ À̹ÌÁö¸¦ À¥ºê¶ó¿ìÀú·Î Àü¼Û
* @param String À̹ÌÁö ÆÄÀϸí
* @param resource À̹ÌÁö°´Ã¼
function show($imgName =
'', $img =
null) {
if ($imgName ==
'' &&
$img !=
null)
$show_img=
$this->load($imgName);
$show_img =
$this -> img;
* @param resource ´ë»ó À̹ÌÁö
for ($x =
0; $x <
$imagex; ++
$x) {
for ($y =
0; $y <
$imagey; ++
$y) {
$red =
($rgb >>
16) & 255;
$green =
($rgb >>
8) & 255;
$grey = (int)
(($red+
$green+
$blue)/
3);
* @param resource ´ë»ó À̹ÌÁö
* @param Int Àû»ö ÂüÁ¶°ª(0-255)
* @param Int ±×¸° ÂüÁ¶°ª(0-255)
* @param Int ºí·ç ÂüÁ¶°ª(0-255)
* @return resource BufferedImage
for ($x =
0; $x <
$imagex; ++
$x) {
for ($y =
0; $y <
$imagey; ++
$y) {
$red =
($rgb >>
16) & 0xFF;
$green =
($rgb >>
8) & 0xFF;
$red = (int)
(($red+
$green+
$blue)/
3);
* @param resource ´ë»ó À̹ÌÁö
* @param Int ³ëÀÌÁîºñÀ²(1 ÃÖ´ë)
for ($x =
0; $x <
$imagex; ++
$x) {
for ($y =
0; $y <
$imagey; ++
$y) {
$red =
($rgb >>
16) & 0xFF;
$green =
($rgb >>
8) & 0xFF;
$modifier =
rand(-
20,20);
* @param resource ´ë»ó À̹ÌÁö
for ($x =
0; $x <
$imagex; ++
$x) {
for ($y =
0; $y <
$imagey; ++
$y) {
$distx =
rand($dist *
(-
1), $dist);
$disty =
rand($dist *
(-
1), $dist);
if ($x +
$distx >=
$imagex) continue;
if ($x +
$distx <
0) continue;
if ($y +
$disty >=
$imagey) continue;
if ($y +
$disty <
0) continue;
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
for ($x =
0; $x <
$imagex; $x +=
$blocksize) {
for ($y =
0; $y <
$imagey; $y +=
$blocksize) {
* @param resource ´ë»ó À̹ÌÁö
* @return resource BufferedImage
list
($b_red, $b_green, $b_blue) =
$this->hex2Int($base_color);
for($i =
0; $i <
256; $i++
) {
$red_table[$i] =
round($i +
(255 -
$i)*
$b_red/
255);
$green_table[$i] =
round($i +
(255 -
$i)*
$b_green/
255);
$blue_table[$i] =
round($i +
(255 -
$i)*
$b_blue/
255);
for ($x =
0; $x <
$imagex; $x++
) {
for ($y =
0; $y <
$imagey; $y++
) {
$red =
($rgb >>
16) & 255;
$green =
($rgb >>
8) & 255;
$nred =
$red_table[$red];
$ngreen =
$green_table[$green];
$nblue =
$blue_table[$blue];
function getKernel($kernel_type, $level =
1) {
foreach($kernel as $key =>
$val)
$kernel[$key] =
1/
9 -
(1/
9 -
$val)/
($level);
* @param resource ´ë»óÀ̹ÌÁö
* @param Array lookup ÂüÁ¶Å×À̺í
for ($x =
0; $x <
$imagex; $x++
) {
for ($y =
0; $y <
$imagey; $y++
) {
$red =
$lookup[($rgb >>
16) & 255];
$green =
$lookup[($rgb >>
8) & 255];
$blue =
$lookup[$rgb & 255];
* @param resource ´ë»óÀ̹ÌÁö
* @param Array kernel ÂüÁ¶Å×À̺í
for ($x =
0; $x <
$imagex; ++
$x)
for ($y =
0; $y <
$imagey; ++
$y)
for ($x =
0; $x <
$imagex; ++
$x) {
for ($y =
0; $y <
$imagey; ++
$y) {
$thiscol =
$color_matrix[$x][$y];
for ($k =
$x -
$dist; $k <=
$x +
$dist; ++
$k) {
for ($l =
$y -
$dist; $l <=
$y +
$dist; ++
$l) {
if ($k <
0) { $colours[] =
$thiscol; continue; }
if ($k >=
$imagex) { $colours[] =
$thiscol; continue; }
if ($l <
0) { $colours[] =
$thiscol; continue; }
if ($l >=
$imagey) { $colours[] =
$thiscol; continue; }
$colours[] =
$color_matrix[$k][$l];
foreach($colours as $i =>
$colour) {
$newr +=
(($colour >>
16) & 0xFF) *
$kernel[$i] ;
$newg +=
(($colour >>
8) & 0xFF) *
$kernel[$i];
$newb +=
($colour & 0xFF) *
$kernel[$i];
* »ö»óÁ¶Á¤ - PHP 5 ¹öÀü ÀÌÇÏ¿ë(effectColor ¿Í µ¿ÀÏ)
* @param resource ´ë»óÀ̹ÌÁö
* @param Int Á¶Á¤¹üÀ§ [-255~ +255]
for($x =
0; $i <
256; $i++
)
* ³×°¡Æ¼ºêÈ¿°ú - PHP 5 ¹öÀü ÀÌÇÏ¿ë(effectReverse ¿Í µ¿ÀÏ)
* @param resource ´ë»óÀ̹ÌÁö
for($x =
0; $i <
256; $i++
)
* ¹à±â Á¶Á¤ - PHP 5 ¹öÀü ÀÌÇÏ¿ë(effectBrighten ¿Í À¯»ç)
* @param resource ´ë»óÀ̹ÌÁö
* @param Int Á¶Á¤¹üÀ§ [-255~ +255]
for($x =
0; $i <
256; $i++
)
* ÄÁÆ®¶ó½ºÅÍ Á¶Á¤ - PHP 5 ¹öÀü ÀÌÇÏ¿ë(effectContrast ¿Í µ¿ÀÏ)
* @param resource ´ë»óÀ̹ÌÁö
* @param Int Á¶Á¤¹üÀ§ [-255~ +255]
$cont_rate =
($cont/
100) *
0.5;
for($x =
0; $i <
256; $i++
)
* ºí·¯È¿°ú - PHP 5 ¹öÀü ÀÌÇÏ¿ë(effectBlur ¿Í µ¿ÀÏ)
* @param resource ´ë»óÀ̹ÌÁö
* @param Int Á¶Á¤¹üÀ§ [1-5]
* »þÆÝÈ¿°ú - PHP 5 ¹öÀü ÀÌÇÏ¿ë(effectSharpen ¿Í µ¿ÀÏ)
* @param resource ´ë»óÀ̹ÌÁö
* @param Int Á¶Á¤¹üÀ§ [1-5]
* ¿¡ÁöÈ¿°ú - PHP 5 ¹öÀü ÀÌÇÏ¿ë(effectEdge ¿Í µ¿ÀÏ)
* @param resource ´ë»óÀ̹ÌÁö
* @param Int Á¶Á¤¹üÀ§ [1-5]
Documentation generated on Mon, 17 Mar 2008 12:17:51 +0900 by phpDocumentor 1.4.0a2
| Copyright 2005 cafen.net