So its 920 bytes worth of CCITT compressed bitonal (B&W) data.
I'm trying to create an imagemagick image out of it but that process just fails and returns null, with error:
NoDecodeDelegateForThisImageFormat `' @ error/blob.c/BlobToImage/358.
Code: Select all
MagickCoreGenesis(".", MagickTrue); // initialize the imagemagick environment
Image* imgMagickImage; // an imagemagick image handle
ImageInfo* imgMagickInfo= AcquireImageInfo(); // the imagemagick image info object
ExceptionInfo* imgMagickException= AcquireExceptionInfo(); // where exception information is stored from calls
imgMagickImage = BlobToImage(imgMagickInfo, (void*) dataBlob, (size_t)tileSize, imgMagickException);
//Image* img = BlobToImage(const ImageInfo *image_info,const void *blob, const size_t length,ExceptionInfo *exception);
CatchException(imgMagickException); // test for and process imagemagick exceptions
if (!imgMagickImage) { std::cerr << "ERROR: no magicImage returned - could not parse the blob" << std::endl; }
MagickCoreTerminus(); // close & clean up the imagemagick environment
It is the same - that is, the blob is the CCITT compressed bit sequence for the compressed data.
Am I missing something here in how to use BlobToImage? When I fed it a blob that was a JPG encoded color image, that returned with the identified JPEG image.
Do I need to decorate the CGM sourced blob with some other stuff before I feed it to BlobToImage?