pyG15, simple python interface + image client

Hello everyone!

This is my first post. I just bought my G15 yesterday, installed g15tools and have been messing around with it. In the process of learning how to write a client for g15daemon (my goal is to write a XMMS2 client), I wrote this little python library.

It takes pictures in BMP and JPG format (gif and png fail at the moment) in colour or grayscale or black and white, will either crop or resize image to fix the G15 LCD, and it will then display the image.

you can use the library in two ways. A module or a stand-alone script you can run from the command line.

Setting a picture in a python program is very easy:

<br />
import g15pic</p>
<p>G15 = g15pic.pyG15()<br />
G15.quickload(filename,invert,threshold)<br />

(Note, the invert and threshold variables are optional, and the threshold variable does not apply to B&W images).

You can also run it as a program from the command line:

<br />
./g15pic.py  /path/to/filename  [invert] [threshold]<br />

Again, the invert and threshold arguments are optional. The image will stay on the LCD screen for 5 seconds (if you want more or less, alter the sleep variable in the script).

I'm posting it here in the belief that it might be useful to other people in it's own right, despite it's simplicity. I use it in script to alert me to things, or to load up images based on keymappings etc...

This script depends on the Python Imaging Library (PIL), so you'll need that installed (as well as G15 tools, but that should be obvious).
You can download it from here: http://www.ziva-vatra.com/downloads/g15pic.tar.gz

Re: pyG15, simple python interface + image client

I've tried it, and when I saw "the man firing bullets" (test file) it was so cool. Maybe someone can release a screensaver with pyG15 easily. Thanks for plugin =)

simple python interface, changes to image client

New version out! (I know, already :P )

Changes:

* Support for other file formats as well (including PNG and gif)
* Code rewrite in areas, new B&W converter.
* Animated image file support. It will now play back animated gifs/pngs/etc.... (try it with the included animated gif: test2.gif)

You can get it at the same URL as above.