Image Compression

Started by
6 comments, last by Bad Maniac 20 years, 9 months ago
I would like some input on this matter. I''m using 16-bit 2D graphics, and I am currently storing them as BMP, but I''m coding a RLE implementation as soon as some other stuff is out of the way. but is there a better lossless (or very low loss) compression that is likely to yield better compression at 640*480*16 bit images? Pseudo code, descriptions or links to tutorials would be good, but I''m thankful for any advice you can give me. The more I think, the more confussed I get.
JRA GameDev Website//Bad Maniac
Advertisement
take a look at zlib for lossless compression
Use the PNG file format (http://www.libpng.org). That''s lossless and uses ZLIB as its data compressor. PNG gets better compression ratios than are achievable with just ZLIB on its own by (losslessly) "pre-filtering" the image data to exploit the way LZ style compression works.

--
Simon O''Connor
ex -Creative Asylum
Programmer &
Microsoft MVP

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

I would infact want an algorithm, or some pseudo code, and write my own image compression, I don''t want to use a library, because I want to code it myself, to get the experience from it.
But thank''s for your replies, I''ll look into both and see what info I can dig up.
JRA GameDev Website//Bad Maniac
Any recommendations for lossy image compression techniques that support progressive resolutions? Wavelets based? Jpeg2000?
Are there any good libraries with fast decompression times?
quote:Original post by Bad Maniac
I would infact want an algorithm, or some pseudo code, and write my own image compression, I don''t want to use a library, because I want to code it myself, to get the experience from it.
But thank''s for your replies, I''ll look into both and see what info I can dig up.

The PNG-format is open. You''re free to implement an own PNG-reader...
Newbie programmers think programming is hard.Amature programmers think programming is easy.Professional programmers know programming is hard.
Um yea or you can use libPNG or glPNG instead..

Question, how do you get the highest compression ratio with PNG''s? Is there some kind of PNG compressor program? I made some with Paint Shop Pro but they still seemed big and they are only 512x512 textures.. just one is about 420KB about the same as a TGA would be, and I''m pretty positive I correctly chose compression options for it.
I saw something called PNGcrush awhile back but I couldn''t figure it out so I ditched it, hmm, maybe that''s what I need..
If you had looked at google, you would have found this:
http://www.cs.toronto.edu/~cosmin/pngtech/optipng.html

This topic is closed to new replies.

Advertisement