Writing 8bit grayscale tiffs with ImageMagick Q16

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
fubert
Posts: 3
Joined: 2014-03-07T08:27:16-07:00
Authentication code: 6789

Writing 8bit grayscale tiffs with ImageMagick Q16

Post by fubert » 2014-06-10T04:51:01-07:00

Hello,
I am using ImageMagick 6.8.8 Q16 for loading 16Bit Tiffs and writing 8Bit Tiffs.

When saving an 8Bit Pixel Tiff image, ImageMagick always creates and 16 Bit Tiff.
Upper 8Bit and lower 8Bit are the same. A 512x512 image needs about 512kb, not 256kb.
How can I write a real 8 bit Tiff ?

Code: Select all

Image image( width,   height,"I", Magick::CharPixel, buffer );
image.compressType(NoCompression);
image.write("d:/tmp/output.tif");
greets,
Dennis

User avatar
fmw42
Posts: 25578
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Writing 8bit grayscale tiffs with ImageMagick Q16

Post by fmw42 » 2014-06-10T09:37:36-07:00

try adding the command line equivalent of -depth 8 via your API

fubert
Posts: 3
Joined: 2014-03-07T08:27:16-07:00
Authentication code: 6789

Re: Writing 8bit grayscale tiffs with ImageMagick Q16

Post by fubert » 2014-06-12T04:06:12-07:00

It works :-)

Thanks for your quick reply!

Post Reply