Bitmap compression

Started by
11 comments, last by GameDev.net 24 years, 4 months ago
Rappler: You're right, except you forgot to add the 54 byte header

kieren_j: Speck is right, PCX files are compressed in all color bit depths, but I find that 24bit PCX files have very low compression, less than 20%, and I don't particularly like the way they're encoded (I studied the PCX file format and wrote my own loader for this format, so I know what I'm talking about )

Splat: I'd have to say BMP files are the easiest to load, hehe! I looked into TGA file format a few months back, and it didn't look that easy. It only uses RLE compression, but the file header is quite a beast. You can cram a whole lot of stuff into that header, I'm beginning to wonder what the origin of that file format was.. looks like it was meant for images used in business apps, because you can have author's name, comments, charts, sales data, memos, phone numbers, la la la... just kidding

I'm looking at the PNG file format at www.w3.org (it's .org)... VERY interesting stuff. They stress the importance of ease of implementation on the developer's part, I'll find out how true that is when I go to implement it (yup, looks like I'm hooked on PNG for now).

If and when I finish my PNG library, I'll offer it up on these boards if anyone is interested.

Advertisement
Since I have recently suceeded in loading a 24bit bitmap properly, I've noticed something: 24-bit bitmaps are BIG.

So, now I am looking for any suggestions for compression, or where I could get a publicly availible algorithm. Winzip has has a 99% compression ration on bitmaps, and I'd like to get that one, but I doubt it's publicly availible. I'll have to go check out the gzip and bzip stuff, they're open source so maybe I'll use one of those.

Anyone have any algorithms they've used sucessfully? Anyone know where I can find one for sure?

2meg for a 256x256 bitmap seems a bit high ;-)

If yo only need to load 256 color bitmaps, PCX is they way to go because of the ease of use, and how since yo can right a function to load philes in bout 15 lines.

This topic is closed to new replies.

Advertisement