Probelm with reading .ico files

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
smugsotemp

Probelm with reading .ico files

Post by smugsotemp »

Hi,
Need some help here.
I'm using PHP version 5.0.5 with magicwand dll (php-5.0.4_magickwand_q8_st.dll)

I'm trying to load a favicon ("http://www.goolge.com/favicon.ico") and convert it to .gif file using the following code snippet:
$favicon = file_get_contents("http://www.google.com/favicon.ico");
print_r($favicon);
$resource = NewMagickWand();
MagickReadImageBlob($resource, $favicon));

I get the follwing failure for the MagickReadImageBlob() function:
Fatal error: magickreadimageblob(): C API unable to read the supplied BLOB argument (reason: UnableToOpenFile `': No such file or directory) [on C source line 7670]


When I'm trying the same code snippet on a .gif file or .jpg file, it works fine. I know magickwand should support .ico files. I tried both 16 colors and 256 colors .ico files but got the same results.

Any idea ?

Thanks,
Post Reply