Is MASM or any others assembler had a tga file loader?
I believe GDIPlus handles Targa graphics files (TGA).
AFAIK the GDI+ image encoders are:
image/bmp
image/jpeg
image/gif
image/tiff
image/png
It seems I need to made my own tga loader.
Hi Farabi
You can use the "Display TGA" routine from the OGL examples of Franck Charlet ( hitchhikr )
http://www.masm32.com/board/index.php?topic=2522.0
greetz Siekmanski
Don't know where I got the idea that GDI plus handled it, maybe just assumed that because its such an old format that it would be supported, but yeah, TGA images are extremely simple though they can be RLE encoded generally they are stored without any compression like a bitmap, the header is simple to read:
http://www.ludorg.net/amnesia/TGA_File_Format_Spec.html
Quote from: donkey on July 14, 2009, 03:23:12 PM
Don't know where I got the idea that GDI plus handled it, maybe just assumed that because its such an old format that it would be supported, but yeah, TGA images are extremely simple though they can be RLL encoded generally they are stored without any compression like a bitmap, the header is simple to read:
http://www.ludorg.net/amnesia/TGA_File_Format_Spec.html
Not really donkey, the TGA file I used is a compressed one. It auto generated by blender.
Quote from: Siekmanski on July 14, 2009, 02:55:09 PM
Hi Farabi
You can use the "Display TGA" routine from the OGL examples of Franck Charlet ( hitchhikr )
http://www.masm32.com/board/index.php?topic=2522.0
greetz Siekmanski
Im gonna take a look. It's save my time from reinventing the wheel.
Hi Farabi,
if its compressed then it uses RLE compression, that's an extremely simple compression scheme...
[npix][value][npix][value]...
so for example if you have 100 black pixels on a scan line foillowed by 80 white pixels:
[100][0][80][255]
Not sure how simpler it can get than RLE.