ATTENTION ALL FANS!!! THIS BLOG HAS MOVED!!!
go to: http://www.taotekaching.com

Wednesday, January 21, 2009

In the name of Science, and Me…

All programmers, at one point or another, have dreamt of this:

3M TA3

Of course, you know what this is, right? It’s a file. Duh, you say? No, you don’t understand. Each pixel represents 4 bytes of a file. I used the first two pixels to “store” the number of bytes of the actual file, then the rest up to that white line at the end, is the file.

Brilliant? Yes, yes I know. I have not been able to purge my mind of this ridiculously stupid project / experiment for years. Every now and then, it’s very “what if” resurfaces like a slightly annoyed blackhead. It needed popping…

Needless to say, it is not very good for compressing. Zipping the image actually increases it’s size slightly. I was skeptical of this, though (this is SCIENCE), so I decided to try it on a PCLinuxOS Mini-Me 2008 ISO image I had laying around on my desktop, which is around 296MB. The bmp generated is quite large – 8821 x 8821. The compression results:

  • PCLOS ISO: 311,207,936 bytes
  • PCLOS ISO bitmapped: 309,407,681 bytes
  • PCLOS ISO zipped: 307,880,700 bytes
  • PCLOS ISO bitmapped & zipped: 309,407,811 bytes

There. Finally. Purged from my mind…but…

WHAT IF I GENERATED A SERIES OF 50 x 50 BITMAPS OF THE ISO AND STRUNG THEM INTO AN AVI?

Not going there. If you do, please dear God and baby Jesus let me know how it goes. Here’s my dumb code if it’ll help, or get it from here:

file

But that’s not all I did in the name of science tonight! I went out to have a cigarette (in our 15 degree weather) in celebration of lobotomizing the bitmap wart from my mind to discover this:

lite-off

In the name of science, I had to know what it would look like lit up. I knew the dangers. I knew I might, potentially, kill the power to our house, destroy my beloved TV, and black out the neighborhood.

lite-on

Eh, boring. Thought all the ice would light up or something…

~zagnut

Submit this story to DotNetKicks