Page 1 of 1

Probelm with reading .ico files

Posted: 2006-09-16T03:00:54-07:00
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,