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

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Feb 17 13:32:17 CET 2010


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.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/




More information about the fpc-devel mailing list