Page 1 of 1

php55-imagick can't convert RAW image into JPEG

Posted: 2016-01-09T22:49:36-07:00
by ayaka
Hi I meet the same problem as this one in Mac OS but not Linux(in Fedora, it works well).
I install php55-imagick/3.3.0 and ufraw/0.22 from homebrew, I have tried both CR2 and NEF format images.
It works at php shell but when I use it in php script, I meet an error like below:

Code: Select all

[Thu Dec 24 05:27:47.318902 2015] [:error] [pid 22517] [client 1xx.87.3x.4x:50264] exception 'ImagickException' with message 'unable to open image `/var/tmp/magick-22517fDB6MUmmdJck.ppm': No such file or directory @ error/blob.c/OpenBlob/2702' in /Library/WebServer/
The code is:

Code: Select all

 
    try {
        $img = new Imagick($sTempRAWFileName);
        $img->setFormat('JPG');
        $img->setImageCompressionQuality(80);
        if(!($img->writeImage($sTempFileName)))
            return false;
        } catch (Exception $e) {
            error_log($e);
            return false;
        }
        break;