Saving file with different extension
Posted: 2008-11-09T11:46:15-07:00
Hi,
i need to solve problem, when i read image (jpg for example) and i want to write it as a jpeg in to file with different extension (tmp).
I tried:
but i get exception:
Fatal error: Uncaught exception 'ImagickException' with message 'no encode delegate for this image format `aa.tmp'' in test.php:33 Stack trace: #0 test.php(33): Imagick->writeimage() #1 {main} thrown in test.php on line 33
Is there any chance to do this??
thx for any help.
i need to solve problem, when i read image (jpg for example) and i want to write it as a jpeg in to file with different extension (tmp).
I tried:
Code: Select all
$im = new Imagick;
$im->readImage('30062007038.jpg');
$im->setImageFilename('aa.tmp');
$im->setImageFormat('jpeg');
$im->writeImage();
Fatal error: Uncaught exception 'ImagickException' with message 'no encode delegate for this image format `aa.tmp'' in test.php:33 Stack trace: #0 test.php(33): Imagick->writeimage() #1 {main} thrown in test.php on line 33
Is there any chance to do this??
thx for any help.