note 23409 deleted from function.imagecopyresampled by aidan
| From: | aidan@php.net | Date: | Mon, 04 Oct 2004 09:45:07 +0000 |
| Subject: | note 23409 deleted from function.imagecopyresampled by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77966@lists.php.net to get a copy of this message | ||
Note Submitter: php at dgb-system dot deANTISPAM
----
The easiest way to work around the problem mentioned above (imagecopyresabled ignores the src_x and
src_y parameters), is using imagecopy first to get the rect and than imagecopyresampled to resampl
it.
temp_im = imagecreatetruecolor (srcW, srcH);
imagecopy (temp_im, s_im, 0, 0, srcX, srcY, srcW, srcH);
imagecopyresampled (d_im, temp_im, 0, 0, 0, 0, dstW, dstH, srcW, srcH);
destroy (temp_im);
Gruß, smintman