View Full Version : best lossless compressed fileformat for textures
02-10-2003, 11:38 AM
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.
Please let me know and thank's in advance,
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.
02-10-2003, 11:10 PM
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).]
02-11-2003, 06:09 AM
My vote also goes for PNG.
It's has lossless compression, supports a wide variety of color formats and it's compression is almost the best.
There is also MNG (Ming) which supports animated images.
If you dont mind the lossiness, try JPEG but I wouldn't use that for textures.
Visit sourceforge, search for libpng project.
02-12-2003, 04:55 AM
many thanks for the infos. I'll give PNG a try.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.