I am trying to convert and image to a tiff using imagemagick but am running into a problem when trying to write the file. I get an error that says:
Unable to open image…
error/blob.c/OpenBlob/2584′
This is the code I am using:
$im2 = new Imagick($image);
$im2->setImageFormat("tiff");
$im2->setImageColorSpace(5);
$im2->writeImage("test.tiff");
$image is just a url I am passing to an image file. I am just running a simple test function to get it to work and put a test.tiff in the same folder. What could I be doing wrong here? Having trouble finding much documentation on this.
The argument of the
Imagickconstructor is to load a local image file. To load a remote image file, you should instantiate anImagickobject without arguments and either:readImageBlobmethod, orfopenthe URL and pass it to thereadImageFilemethod.For example: