Get RGB data of a picture?

Hi,

to generate a screenshot i’d like to get the data of
parts of the screen in a known format, preferred is RGB.

Can i create a surface without alpha channel that stores
the data as RGB, so to say 3 bytes per pixel?

Or can there be a fill byte inbetween?

In an example i just made there were 3 bytes per
pixel (surface->pitch == 3 * surface->w), but will this
always be the case?

Best regards,
Torsten.

No, that will not always be the case. With hardware surfaces,
horizontal lines will often be aligned to some crazy boundaries, so be
prepared to see any kind of pitch.On 5/17/06, Torsten Mohr wrote:

In an example i just made there were 3 bytes per
pixel (surface->pitch == 3 * surface->w), but will this
always be the case?


Regards,
Rasmus Neckelmann
http://royal.flof.dk/rasmus