Error convert all .icon to .png file

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.
Posts: 2
Joined: 2020-02-11T09:24:28-07:00
Authentication code: 1152

Error convert all .icon to .png file

Post 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
$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.