News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

TGA File loader

Started by Farabi, July 14, 2009, 03:32:30 AM

Previous topic - Next topic

Farabi

Is MASM or any others assembler had a tga file loader?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

donkey

I believe GDIPlus handles Targa graphics files (TGA).
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

MichaelW

AFAIK the GDI+ image encoders are:
image/bmp
image/jpeg
image/gif
image/tiff
image/png
eschew obfuscation

Farabi

It seems I need to made my own tga loader.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Siekmanski

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

donkey

#5
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
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Farabi

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.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

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.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

donkey

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.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable