Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

fluke

best image formats for game programming

This topic is 5758 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

bitmaps looks so crisp and clean, but they are really big. what is the ''industry standard''? pcx? And what do i use to load alternate image formats? i can''t get LoadImage() to load anything other than windows bitmaps! ack! thanks in advance for your info!!!

Share this post


Link to post
Share on other sites
Advertisement
tga, png, and jpg are popular. many times though game developers will develop their own image format and/or "package" it into a compressed file (such as .zip).

---
My Site-My Tetris Clone w/Source
Come join us on IRC in #directxdev @ irc.afternet.org

edit: I had the file types confused.

[edited by - RapidStunna on September 13, 2002 8:09:40 PM]

Share this post


Link to post
Share on other sites
hey RapidStunna, i thought jpeg was only good for ''photo-images''.
also, do you guys know the equivilent of LoadImage() so that I can get the image properties at run time? i suppose it''s no big deal, but it would be cool to know. thanks!

Share this post


Link to post
Share on other sites
JPEGs are good because they are small, but the compression can blur them out. TGAs are good because they have a built in alpha channel. BMPs are good because they are NOT compressed, and will always look the same; no decompression algorithm. They are also slightly smaller then uncompressed TGAs.

I use all three interchangeably, my texture loading routine reads the header to determine what kind of file it is and loads it apporpriatly.

Share this post


Link to post
Share on other sites
PNGs are great because they can have any number of channels, use a lossless compression algorithm, and each channel can have a different number of bits per pixel.

What does that mean? "BMP" image quality (no image loss due to compression), small filesize, and just as many channels as you need.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi,

For 3D-Programs I suggest .dds, because it increases performance and startup times. TGA is easy to load, PNG, as mentioned already, also has its pros.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The bad thing when using any compressed format that is not handled by your graphics adapter, is that the process is kinda ineffective:
You have a hi-res texture and compress it in order to reduce memory usage on your hard drive and enhance startup-times. Then, loading the texture, you have to decompress it as the graphics adapter expects uncompressed data. So you allocate memory, store the texture, and delete the compressed data you loaded from disk.
Now, if you''re using texture compression, the graphics adapter again compresses the data to store it and creates mipmaps (or you do that manually). Anyways, both compression steps cost time, the mipmapping process costs time and, due to the fact that you compress data that was already compressed, you have a dramatic loss of detail, because there are artifacts by 2 compression algorithms.

Precompressed and premipmapped data doesn''t suffer from this problem. (Thats dds for example).

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!