[HELP] Newbie cloning problem

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
zax

[HELP] Newbie cloning problem

Post by zax »

Hello,

Sorry if it's a stupid question but I encounter a strange problem with clone().

This code produces an empty document:

Code: Select all

$image = new Imagick();
$image->readImage($myFile);
$imgCopy = $image->clone();
$imgCopy->writeImage($destinationFile);
Though, $myFile and $destinationFile are valid because this code works:

Code: Select all

$image = new Imagick($myFile);
$imgCopy = $image->clone();
$imgCopy->writeImage($destinationFile);
Am I doing something wrong?
Thanks for your help.


PHP Version 5.2.6-3ubuntu4.5

module version 2.1.1-rc1
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator
ImageMagick version ImageMagick 6.4.5 2009-06-04 Q16 OpenMP http://www.imagemagick.org
Post Reply