Very small logos for 4k?

There was a topic on Pouet recently of doing logos in 256bytes. I didn't even know this was possible so I gave it a go. The logo below is 183 bytes.

I learnt a few things. Firstly, PNG tends to be smaller than JPEG at this level of compression so PNG is best. Second, I used Paint Shop Pro (can't afford photoshop) and switched on all its optimising and the image was well over 300 bytes. However I then downloaded irfanView and the available plugins for it. One of the plugins is called PNGOUT and its great at compressing.

One thing, make sure you set save chunks to NONE. Heres another example, much larger, and only 227 bytes. Obviously the black helps...

So it would be possible to make a logo for a 4k intro for 150-200 bytes. PNG loading is easy too, simply load the image using d3dx - very few bytes. It can be read into an array and passed to OpenGL textureing if required...at least I hope so - the logo is 1 bit per pixel, I'm not sure how it will appear in memory when loaded. One way to find out...

In more tests, I did 16x16 images to see if texturing would be possible this way. Once you have the code to load a PNG it makes sense to use it as many times as possible. However the file over head is such that even the simplest of 16x16 images is around 100 bytes. So there is no significant advantage in going very small and really any PNG image looks like it is going to be 100-200 bytes as a minimum. At this size it makes more sense to encode the 1-bit bitmaps into the code itself and use GL_BITMAP type for the texture (16x16x1 = 32 bytes).

A couple more tries, close to 256bytes each.

No comments:

Post a Comment