Reading CCITT encoded images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
FlashFan
Posts: 13
Joined: 2011-01-05T03:41:09-07:00
Authentication code: 8675308

Reading CCITT encoded images

Post by FlashFan »

Hi guys

Im trying to read CCITT encoded images out of PDF files. I've found a method called "compressType", which is to get/set the CompressionType of the image.
But how can I use this, and how can i tell Magick++ the other parameters of the CCITT compression?

My code is the following:

Code: Select all

blob = new Blob((const void*)img.c_str(),img.length());
image = new Image();
image->compressType(CompressionType::FaxCompression);
image->read(*blob);
img is a string which contains the binary data of the image stream.
This code throws an error.

Can someone tell me how i can load such images correctly?
Post Reply