[SDL] tga file loading ...

vining at pacificcoast.net vining at pacificcoast.net
Fri Apr 28 11:17:11 PDT 2000


>>Does anyone here know how to load a tga into a SDL surface? 
>>the sdl image lib doesnt seem to have it ...
>
>Having written a number of TGA encoders/decoders, I can assure you it is
>nearly trivial since it is a *very* simple format (even if you allow RLE
>encoding). The only major drawback is its lack of magic number in the header,
>so you have to identify them by the file suffix.

Why not compare the width/height/bpp information to the size of the raw data as 
a sanity check?

Nicholas



More information about the SDL mailing list