Page 1 of 1

Error convert all .icon to .png file

Posted: 2020-02-12T20:53:16-07:00
by healcentral
Hi all, My error:
I'm using PHP 5.6, hosting linux centos 7
I'm trying to load a myicon all icon in folder and convert it to .png file using the following code snippet:

Code: Select all

$myicon = file_get_contents("url ../allfileicon/");//all file .icon
print_r($myicon);
$filemg = NewMagickWand();
MagickReadImageBlob($filemg, $myicon));
Error load website:
Fatal error: magickreadimageblob(): C API unable to read the supplied BLOB argument (reason: UnableToOpenFile `': No such file or directory) [on D source line 48212]




When I'm trying the same code snippet convert .jpg file or .png file, it works fine. I know magickwand should support .ico files.

Magick hellp me, thanks.