Log in

View Full Version : Png format


Brad8383
01-16-2003, 01:28 PM
Is png a good format to use for game graphics? How much space would I save compared to a bitmap? Also does anyone have any good links for png files?

Lerc
01-16-2003, 01:56 PM
PNG as several good features.

It does palleted or non-paletted and it can provide you with an alpha channel. You can store images in 16 bits per channel if need be.

Depending on what you are using for data PNGs can be quite useful.

If you need images with a full alpha channel then PNGs are a good option.

You can pretty much determine how big a bitmap woud be if converted to a png by zipping it. PNGs use zlib for compression. There are some scanline filters that can improve compression a bit and there's a progressive transmission form which lowers compression a bit.

For my own code I just use straight windows bitmaps because I store them in zip packages acheiving much the same compression. But this is just for 256 colour images.

for RGBA textures I would actually prefer a lossy (but high quality) compressor. Something Wavelet would be bnice but I have yet to find any ibrary in my price range. I'm tempted to write my own wavelet code although I'm a bit wary of inadvertantly violating patents in the process.


For PNG go here (http://www.libpng.org/)

Dan MacDonald
01-16-2003, 02:04 PM
PNG is my favorite format by far, thanks for the link!