PixelPacket Lab values

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
citydavid
Posts: 4
Joined: 2011-11-24T02:54:23-07:00
Authentication code: 8675308

PixelPacket Lab values

Post by citydavid » 2014-01-08T05:56:30-07:00

How Lab values are stored? I read that in the last version ImageMagick-6.8.8-Q16, the a* value and b* value are unsigned, but I don't find a correct correlation!

For example: in a tiff image with lab colorspace I have L=50 a=-10 b =-10, and pixel->red =34504 pixel->green =28257pixel->blue =30184.

What I do wrong?!

David

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

Re: PixelPacket Lab values

Post by fmw42 » 2014-01-08T11:19:39-07:00

The values are biased so that they can be represented as non-negative integers (for non-hdri compile). I believe that in HDRI compile, they are not biased. You will need to look at the code to see how that is done.

Post Reply