Prevent automatic depth reduction

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
paolopazziani
Posts: 2
Joined: 2013-04-11T00:03:18-07:00
Authentication code: 6789

Prevent automatic depth reduction

Post by paolopazziani » 2013-04-11T00:29:07-07:00

Hi, I'm working on a program that needs to make changes to images (resizing, cropping, ...) without altering the total depth of each pixel. I have noticed that as a result of a disk read by any of the following methods:
- // Construct from image files or image specification
     Image (const std :: string & imageSpec_);
- // Read single image frame into current object
     void read (const std :: string & imageSpec_);
the total depth is reduced in some case when number_of_colors <2 ^ total_depth
Is there a way to prevent this behavior? Or restore the original depth?

Post Reply