[SDL] Pixel byte manipulation question.

Paul Duffy odubtaig at yahoo.co.uk
Tue Oct 2 16:35:46 PDT 2007


On Tue, 2007-10-02 at 13:33 -0500, matt hull wrote:
> On Oct 2, 2007, at 10:45 AM, Paul Duffy wrote:

> i am not sure how SDL handles internal surfaces.
> 
> are you writing an application with SDL or trying to understand it  
> more ?

Well, mainly I need the ability to blit arbitrary pixels, and clear by
colorkey regardless of colour depth or platform.

> you could look at the source.

I've been doing a fair bit of prodding at pixels.c, SDL_Surface.c and
the SDL_image files but it's quite time consuming. I've garnered a fair
bit about how it's all put together but this last detail's a bit
heavy-going and I may have to go through everything that does anything
with the data to know what I can and can't expect e.g. is it permissable
to have the masks r = 0xFF000000, g = 0x00FF0000, b = 0x0000FF00 for a
24 bit RGB image or do the first two bytes _have_ to be zero if no Alpha
mask is present?

Maybe it'll be more enlightening to look at the screen blitting
functions to see what they expect.

Thanks for replying anyway :o)


		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com


More information about the SDL mailing list