We Can Do It, in CGA, as a Tweet
So, going even further into Tweet image compression, I thought, “Let’s add some color.” A good way to get decent compression is to limit the number of colors you use to a specific quantity. You don’t have to encode the numbers, you just refer to a common table of values that never change. This way, you can get a range of hues in your images. But most “indexed” color formats actually save the color index with the pixel information. To save that overhead, I should use a palette that would be easy to find in the wild.
Enter the CGA palette. This will be familiar to people who grew up in the early days of IBM PC systems, where a “color” game might include cyan, magenta, white and black. That would have been the 2-bit version of the 4-bit palette used in IBM’s Color Graphics Array. The full range of this palette can be seen thusly:
Taking these colors as their hex values
(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F), I could encode a color image of at least 10 x 13 pixels. Which is what I did. I could even include a blurb to indicate the compression scheme!
Right there is the lovely image presented at full size. Of course, it’s the iconic Rosie the Riveter poster from WWII, with the inspirational message of “We Can Do It!” In the interest of looking at the pixels, here’s a larger version:
Here’s the pixel map in CGA values:
And, finally, here’s the tweet that encodes it all:
EE3337CECDEE3388C7C6E611117ECCE600000865CE8000886668800088888 CGA 10x13