Caught exception: no decode delegate for this image format `' @ error/blob

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Mahir
Posts: 47
Joined: 2016-10-22T06:58:23-07:00
Authentication code: 1151

Caught exception: no decode delegate for this image format `' @ error/blob

Post by Mahir » 2016-11-03T16:15:01-07:00

I have tried many different solutions, but cannot use Imagick::readImageBlob, any help would be appreciated.

Error message:Caught exception: no decode delegate for this image format `' @ error/blob.c/BlobToImage/364

$svg = file_get_contents($this->svg);
$image = new Imagick();
$image->readImageBlob($svg);
//...
SVG:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="928" height="933" id="parent">

<image width="928" height="933" xlink:href="image.jpg" ></image>

<path id="path1" fill="none" d="M100,656.5c-105.1-200.5-28.1-448,172-553s447.5-27.5,552.6,173s28.1,448-172,553 S205.1,856.9,100,656.5z"/>
<text text-anchor="middle">
<textPath xlink:href="#path1" startOffset="33.3333%">
<tspan>top</tspan>
</textPath>
</text>

<path id="path2" fill="none" d="M121.8,264.8C10.2,453.3,72.2,696.3,260.3,807.7s431,48.9,542.6-139.5 s49.5-431.5-138.5-542.8S233.3,76.4,121.8,264.8z"/>
<text text-anchor="middle">
<textPath xlink:href="#path2" startOffset="33.3333%">
<tspan>bund</tspan></textPath>
</text>
</svg>

can you help me pleas

Thanks

gringo974
Posts: 16
Joined: 2016-10-04T07:07:21-07:00
Authentication code: 1151

Re: Caught exception: no decode delegate for this image format `' @ error/blob

Post by gringo974 » 2016-11-08T07:00:55-07:00

Try to set the file format before calling readImageBlob.

Code: Select all

$image->magick("SVG");

Post Reply