tiff writeImages fail with JPEG compression converted to grayscale
Posted: 2016-01-08T05:55:04-07:00
Some color-images fail under Magick++ when trying to save them in TIF-format with JPEG compression and converted to grayscale
If I remove the img.type()-code, writeImages doesnt fail.
Error message:
Magick: IO error writing tag data. `TIFFWriteDirectoryTagData' @ error/tiff.c/TIFFErrors/553
ImageMagick 6.9.2-5 Q16 x86_64 2015-11-04
tifflib 4.0.6
Typical code:
std::vector<Magick::Image> imglist;
...reading source file and misc operations...
img.type( Magick::GrayscaleType );
img.resolutionUnits(Magick::PixelsPerInchResolution);
img.density(Magick::Geometry(200,200));
img.magick("TIF");
img.depth(8);
img.compressType(Magick::JPEGCompression);
img.scale..
..finished reading images...
Magick::Blob mblob_out;
writeImages(imglist.begin(), imglist.end(), &mblob_out);
The source file (a PDF) is located here: https://mail.netclient.no/file_link?id= ... 1894253351
If I remove the img.type()-code, writeImages doesnt fail.
Error message:
Magick: IO error writing tag data. `TIFFWriteDirectoryTagData' @ error/tiff.c/TIFFErrors/553
ImageMagick 6.9.2-5 Q16 x86_64 2015-11-04
tifflib 4.0.6
Typical code:
std::vector<Magick::Image> imglist;
...reading source file and misc operations...
img.type( Magick::GrayscaleType );
img.resolutionUnits(Magick::PixelsPerInchResolution);
img.density(Magick::Geometry(200,200));
img.magick("TIF");
img.depth(8);
img.compressType(Magick::JPEGCompression);
img.scale..
..finished reading images...
Magick::Blob mblob_out;
writeImages(imglist.begin(), imglist.end(), &mblob_out);
The source file (a PDF) is located here: https://mail.netclient.no/file_link?id= ... 1894253351