sorry, this ain’t an opengl question but i suppose most of you had the same problem once.
Currently i use BMP files as source of my textures. Unfortunatly they use too much space. Now i wonder which lossless compressed fileformat got the best compression rate.
What is best depends on what you need. But most common are TGA and PNG. TGA is pretty easy to load yourself, but PNG more or less requires a third part library, either to completely load the image, or at least zlib to decompress the image data. Try both and see how they work for you.
Or if you want to stick with BMP, compress them. They use almost the same kind of compression as TGA.
To clarify: the PNG format has the best compression ratio (better than GIF, TGA and BMP etc). It uses some clever techniques (like color prediction) to optimize compression (which is based on ZLIB, i.e. the same algo that ZIP uses).
You CAN do slightly better compression than PNG, with similar techniques (no fancy SPIHT compression etc), but then you have to do your own format, and the minimal compression gain is hardly worth it.
Another advantage with PNG is that it supports many different color depths (even 48-bit images and alpha components).
[This message has been edited by marcus256 (edited 02-11-2003).]