note 36242 added to function.imagecopyresampled
| From: | code_couturier at graffiti dot net | Date: | Thu, 02 Oct 2003 05:41:59 +0000 |
| Subject: | note 36242 added to function.imagecopyresampled | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-57580@lists.php.net to get a copy of this message | ||
# if you using an old gd-version (4.2.x php+bundle)
# imagecopyresampled doesn't work correct because
# the src_x and src_y values are ignored.
# here is a (bum-bum) solution to solve this
# problem without fixing it ( ;
# first, copy the part you want into a temporary image
# at position 0,0
imagecopy ($tmp_img, $img,0,0,$posx,$posy, $sizex,$sizey);
# than use another image to copy and resample it,
# to get a larger/smaller version of it
imagecopyresampled ($img_new,$tmp_img,0,0,0,0,$new_sizex, $new_sizey, $sizex,$sizey);
# and than you can use it in your own image
imagecopymerge ($my_img,$img_new,
$myposx,$myposy,0,0,$new_sizex,$new_sizey,$alpha_value);
----
Manual Page -- http://www.php.net/manual/en/function.imagecopyresampled.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+36242
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+36242&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+36242&report=yes