MVG autodetection failing in ImageMagick 6.5.0
Posted: 2009-04-13T07:12:22-07:00
With an earlier ImageMagick version, the equivalent of the following worked:
Now in version 6.5.0 I get an error: ImageMagick: NoDecodeDelegateForThisImageFormat `' @ blob.c/BlobToImage/344
However, if I save the content in a temporary .mvg file and read the content from the file, everything works. It seems it is no longer able to autodetect MVG format in a blob. I know I could force the format by calling image.magick("mvg") before the reading, but in the real app the image reading part does not have the format knowledge at hand.
Thanks
Paavo
Code: Select all
char* block = malloc(size);
strcpy(block, "push graphic-context\n viewbox 0 0 ...
Magick::Blob blob;
blob.updateNoCopy(block, size, Magick::Blob::MallocAllocator);
Magick::Image image;
image.read(blob);
However, if I save the content in a temporary .mvg file and read the content from the file, everything works. It seems it is no longer able to autodetect MVG format in a blob. I know I could force the format by calling image.magick("mvg") before the reading, but in the real app the image reading part does not have the format knowledge at hand.
Thanks
Paavo