note 17285 deleted from function.imagecopyresized by jimw
| From: | jimw@php.net | Date: | Tue, 18 Dec 2001 22:56:19 +0000 |
| Subject: | note 17285 deleted from function.imagecopyresized by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23288@lists.php.net to get a copy of this message | ||
Note, that you have to create instances of the Images you use with ImageCopyResized()!
So something like:
ImageCopyResized("/web/images/NewImg.jpg", "/web/images/OldImg.jpg", 0,0, 0,0,
$NewImageX,$NewImageY, $ImageWidthX,$ImageHeightY);
_won't_ work!
Use the ImageCreate() and the ImageCreateFrom[...] functions to create instances.
For example:
$SourceImg = ImageCreatefromjpeg("/web/images/OldImg.jpg");
$TargetImg = ImageCreate($NewImageWidth, $NewImageHeight);
ImageCopyResized($TargetImg, $SourceImg, 0,0, 0,0, $NewImageX,$NewImageY, $ImageX,$ImageY);