-
Junior Member
Regular Contributor
BITMAP or TGA??????????
Hi guys!!
I've seen many examples on This site of eg. heightmaps saved as .bmp and others as .tga which then were used in demos. To be honest I don't know really much about tga and therefore I would like to ask you guys for an explanation! What is the diffenrence between .bmp & .tga. The advantages & disadvantages of using both? (I guess .bmp eats more memory?)
What is the best format to use for heightmaps? maybe some other then these 2 above?
Thanks all!
[This message has been edited by robert_s (edited 08-18-2001).]
-
Senior Member
OpenGL Guru
Re: BITMAP or TGA??????????
- TGA can store and alpha channel, BMP can't.
- TGA supports compressed data, BMP don't
- Uncompressed TGA and BMP are of about the same filesize. The only difference is a few bytes in the header, which tells you how the file is stored. The actual data is raw data.
- Compressed TGA's can be smaller, but does't have to. Due to the type of compression used, they can actually become larger.
- Both BMP and uncompressed TGA are easy to load. Compressed is a bit more work.
The best format for a heightmap is the format you can read. A JPG-image is useless if you can't read it.
I think PNG files are the best for any kind of images. They support alpha, the have very nice compression ratio, not too difficult to load, lossless compression (JPG has destructive compression).
-
Advanced Member
Frequent Contributor
Re: BITMAP or TGA??????????
Bob, you forgot
BMP are windoze crap.
I wrote a very simple function to load a uncompressed TGA. I don't know how bmps are, but it was really easy. It took me just a couple of days, while doing many other non-gl-related things.
TGA all the way!
How many professionals uses bmps?
-
Junior Member
Regular Contributor
Re: BITMAP or TGA??????????
ok Guys! Thx!!
I'll go for TGA as this one will work on linux as well!
thanks for your replies!
-
Member
Regular Contributor
Re: BITMAP or TGA??????????
256 color bitmaps can be RLE-compressed just like a targa.
j
-
Advanced Member
Frequent Contributor
Re: BITMAP or TGA??????????
Whoops!
I forgot to tell you where to find file format specifications.
ftp://ftp.truevision.com/pub/TGA.File.Format.Spec/
It took me three days to find it ^_^!
PLZ tell me if you find the jpg specs...
Enjoy!
-
Senior Member
OpenGL Guru
Re: BITMAP or TGA??????????
Obli, I don't know if that windoze crap was a joke or something like that. If it wasn't, I have to say I don't really agree on that one. Sure, they might be crap, but not windoze crap. Nothing stops you from using them under Linux, Solaris, MacOS, BeOS, <insertyourfavoriteoshere>, and so on. And for the crap thing. If BMPs are crap, then so are uncompressed TGAs. The only difference is the header 
And j, now when you say it, sure there are RLE-compressed BMPs aswell. Sorry 'bout that one. By the way, compressed TGAs uses RLE-encoding aswell.
But I agree that TGAs are more usefull that BMPs. They can handle the important alpha channel!
Obli, I wouldn'r recoment you do the JPG loading yourself. Get a third party library instead. I can recomend Inter JPEG library, try search for it somewhere at cedar.intel.com .
Specifications for a whole bunch of fileformats can be found at www.wotsit.org
-
Junior Member
Regular Contributor
Re: BITMAP or TGA??????????
thank you very much 4 ur advices guys!
I'll check your links!
I am sure these will help a lot!! 
Obli - if I found some stuff about jpg's then I'll let you know straight away!
-
Advanced Member
Frequent Contributor
Re: BITMAP or TGA??????????
I simply have to admit I was wrong.
I always heard of .bmps in windows... well I know something new. Thanks, especially for those useful links!
[This message has been edited by Obli (edited 08-19-2001).]
-
Senior Member
OpenGL Guru
Re: BITMAP or TGA??????????
Well, BMPs originates from Windows, but they are just files ending with ".bmp". This file can be moved across any platform as you want, it's just a matter of understanding what each byte in the file means. So I DO understand what you meant by "windoze crap"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules