[fpc-devel] Correlation between TFPColor and RGB values (possible inconsistencies)

Michael Van Canneyt michael at freepascal.org
Wed Feb 17 13:36:03 CET 2010



On Wed, 17 Feb 2010, Graeme Geldenhuys wrote:

> Luiz Americo Pereira Camara wrote:
>>
>> Assuming that, giving a color in 24bit RGB (one byte per channel) where
>> $00 means no color $FF full color, if a channel is on the middle ($80 =
>> 128) it would be equivalent to $8000 in the 48bit format, right?
>> LazIntfImage is returning $8080.
>>
>> If channel is $40 (=64) in 24bit, it should not map to $4000 in 48bit?
>> LazIntfImage is returning $4040
>
>
> Exactly! :) Using the same ratio of each color channel defined in a known
> 24-bit range and upscaling it to 48-bit (keeping the same ratio), not all
> definitions in fpImage are correct. They are close, but not 100% correct.

The ratio is just one of many possible color metrics.

Michael.



More information about the fpc-devel mailing list