[lazarus] Wrong colours in win32

Micha Nelissen micha at neli.hopto.org
Sat Dec 13 14:33:43 EST 2003


Micha Nelissen wrote:

> Mattias Gaertner wrote:
> 
>>
>>
>> Yes.
>>
>> To reduce the confusion:
>> fpImage splitts and modularizes the reading/writing of images. For 
>> example the XPM reader parses a stream and converts each pixel into a
>> TFPColor, to call SetPixel for each pixel. So, this conversion is XPM ->
>> TFPColor (48bit depth). Theoretically XPM supports more than 48 bit 
>> depth,
>> but practically not, therefore this conversion is lossless.
>> The TLazIntfImage overrides the SetPixel method and sets the pixel 
>> according
>> to the RawImage format. This can result in loss of color information.
>>
>> So, yes, the splash logo is paletted, and no, fpImage has no problem with
>> it.
>> When you save an XPM, the palette is created on the fly.
> 
> 
> Ok. My hunt continues... ;-)

It's fixed now. Wrong color format, 5-5-5 instead of 5-6-5. Maybe this 
info is retrievable from win32 api / device, instead of hardcoded, but I 
don't know how.

Regards,

Micha.






More information about the Lazarus mailing list