PHP code:
Code: Select all
$thumb = new Imagick("cr2:".$_SERVER['DOCUMENT_ROOT']."/test/image/test.cr2");
$thumb->resizeImage(200, 200, Imagick::FILTER_LANCZOS, 1);
$thumb->writeImage($_SERVER['DOCUMENT_ROOT']."/test/image/test.png");
$thumb->destroy();
Code: Select all
Fatal error: Uncaught exception 'ImagickException' with message 'unable to open image `/tmp/magick-XXnx4mFF.pnm': No such file or directory @ blob.c/OpenBlob/2489' in /home/user/domains/domain.nl/public_html/test/image.php:12 Stack trace: #0 /home/user/domains/domain.nl/public_html/test/image.php(12): Imagick->__construct('cr2:/home/user...') #1 {main} thrown in /home/user/domains/domain.nl/public_html/test/image.php on line 12
When I use the same code with an JPG, its works fine
PHP code:
Code: Select all
$thumb = new Imagick("cr2:".$_SERVER['DOCUMENT_ROOT']."/test/image/test.jpg");
$thumb->resizeImage(200, 200, Imagick::FILTER_LANCZOS, 1);
$thumb->writeImage($_SERVER['DOCUMENT_ROOT']."/test/image/test.png");
$thumb->destroy();
ImageMagick Supported formats - CR2.