Hi,

ext Michael Stepanov wrote:
> On Tue, Apr 15, 2008 at 3:50 PM, Frantisek Dufka <[EMAIL PROTECTED]> wrote:
>>> So, how in that situation I can get correct color?
>>>
>> It is already correct. The color format is RGB565. What 'correct' means to
>> you in this context? If you need the value in different format you need to
>> convert it.
>>
>>
> Yes, I need to convert RGB565 to RGB888 to compare two values - actual pixel
> color and pink color. Could you suggest me, please, some way to do that?

SDL_Surface pixel format structure contains the necessary shift & mask
values already for this conversion and SDL documentation has an example
on how to use them.

SDL automatically does the conversion in the other direction (e.g.) 
RGB888 -> display format, but for performance reasons it's usually best
to do that conversion when loading images etc.  (SDL offers a separate
function for this conversion)


        - Eero
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to