how get quantum depth information

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
ctyszkiewicz
Posts: 4
Joined: 2010-11-18T14:55:19-07:00
Authentication code: 8675308

how get quantum depth information

Post by ctyszkiewicz »

Hello

What function form Image Magick c++ API allows to get the information of number of bytes per color of the image.
I thought that GetImageInfo() is designed for this purpose, however it "initializes image_info to default values". How get the true value eg. read the image header.

Best regards

Cuma
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: how get quantum depth information

Post by magick »

The Magick++ API call to return the image depth is modulusDepth():
  • cout << image.modulusDepth() << endl;
ctyszkiewicz
Posts: 4
Joined: 2010-11-18T14:55:19-07:00
Authentication code: 8675308

Re: how get quantum depth information

Post by ctyszkiewicz »

magick wrote:The Magick++ API call to return the image depth is modulusDepth():
  • cout << image.modulusDepth() << endl;
In this case on my box the compilator says:
cimmg.cpp:391: error: ‘struct _Image’ has no member named ‘modulusDepth’

Maybe I have older version of Image Magick where Image is not a class. Thank to this error after few trials finally I have find the solution:

(*image).depth

Thanks for help

Cuma
Post Reply