I've updated the first post with a link to the new weather app, and it should work on both
4-bit and 8-bit displays.
For anyone who's interested, here's the technical explanation.
I looked at the raw image files on the Kobo in /etc/images, and I noticed that it seemed
to be formatted quite simply. It's just a list of hexadecimal colors, one for each pixel,
starting with the top left corner. For example, "\xff" is white, and "\x00" is black.
Here's some python code that takes an image loaded as a pygame surface and converts
it to a raw image format suitable for the Wifi.
hex_chars = "0123456789ABCDEF"
return hex_chars[color / 16] + hex_chars[color % 16]
raw_img = ""
for row in range(surface.get_height()):
for col in range(surface.get_width()):
color = surface.get_at((col, row))
raw_img += ('\\x' + to_hex(color)).decode('string_escape')
f = open("/tmp/img.raw", "wb")
The raw image file can be displayed with
cat img.raw | /usr/local/Kobo/pickel showpic