It’s hard to say without knowing what data you’re packing, but there are a few things I can say:
-
You’re probably not reducing your information in any significant fashion. Just changing the format is no guarantee of better results.
-
Whenever you change your compression method, it’s always important to include the decoder into the computations. When I use SuperPackME, I’m accepting a fairly hefty cost in the code for the image decoder, but I more than make up for it in the space saved in the images. I did some tests with oNyx’s JetPack game last year and found that the low number of images he used combined with the low number of colors meant that SuperPack (not the ME version) would actually be larger.
Keep in mind that you’re wrestling with the theory of information. If you don’t fully understand how your data is stored, it can be difficult to further reduce it.
[quote]something to note though, as I said before, I’m not familiar with bitpacking, so it is very possible that the String I made just isnt small enough. Do you know a better method to inline that image? do you have a tutorial for bitpacking? Im always open to learning something new
[/quote]
Bitpacking is a simple concept. There are 8 bits in a byte, right? So let’s say you have an image that only has two colors. If you store it as a PNG, the PNG will store 4 bytes (32 bits) per pixel. That’s a lot of wasted space for only two values! But if you look at each bit as a color, then you can pack the image into 1 bit per pixel. Here’s the results for a 320x200 pixel image:
PNG: 320x200x32 = 2,048,000 bits = 256,000 bytes
Bitpacked: 320x200x1 = 64,000 bits = 8,000 bytes
Does that help explain the concept?
[/quote]
duno why you’re getting those 404s, so I’ll just attach it to the post.
Anyway, I sort of see the concept but I have some questions about this:
in my particular scenario it would be:
PNG: 256x82 = 20992 pixels = 671744 bits = 83968 bytes = ~82K
Bitpack: 256x82 = 20992 bits = 2624 bytes = ~2.5K
the change is noticable but why is it when you use pngout (or something similiar) it doesn’t come close to 82K? The clouds.gif file itself is only 632 bytes! That’s even smaller than the bitpack example above, unless I’m not doing math right (I am a bit tired :P).
Also, when you say " look at each bit as a color," what do you mean exactly? (code-wise)
Sorry if I’m missing the obvious