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