Archived

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

Bad Maniac

Image Compression

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Any recommendations for lossy image compression techniques that support progressive resolutions? Wavelets based? Jpeg2000?
Are there any good libraries with fast decompression times?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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..

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you had looked at google, you would have found this:
http://www.cs.toronto.edu/~cosmin/pngtech/optipng.html

Share this post


Link to post
Share on other sites