Loading pure RLE ( not Bitmap ) Image

I have some image data that is already RLE encoded, but contains no
Bitmap headers, so essentially raw RLE. Is there an easy way to load
this data using SDL?

Thanks,

Dominique.

RLE (Run-Length Encoding) is a vague term, and can be pretty much
anything that’s based on the general idea of encoding sequences of
identical (or even similar) objects in some way, for speed and/or
space.

That said, there is a (relatively) easy way:

1. Create a surface (SDL_CreateRGBSurface()) with a fixed,
   known pixel format; 24 bit RGB, 32 bit RGBA or whatever.

2. Hack your own decoder that loads the file into a buffer
   and decodes it into the 'pixels' array of the surface.

3. Use SDL_ConvertSurface(), SDL_DisplayFormat() or
   whatever you need, to convert the surface to a suitable
   pixel format for your application - if you need to
   convert it at all. (Usually not really necessary unless
   speed is critical. SDL converts on-the-fly as needed.)

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Thursday 16 June 2005 00.56, Dominique Louis wrote:

I have some image data that is already RLE encoded, but contains no
Bitmap headers, so essentially raw RLE. Is there an easy way to load
this data using SDL?