europython
spent parts of last week and the weekend in Florence (*) which was awesome as usual (both the city and the conference).
since I'm lazy, I didn't see all the talks I should have seen, and I also didn't attend the full sprints, but dropped by to say hi, and also ran my own micro-sprint (until the laptop battery ran out) which I used to add support for a new file format to PIL:
>>> from PIL import Image
>>> im = Image.open("Images/lena.webp")
>>> im
<PIL.WebPImagePlugin.WebPImageFile image mode=RGB size=128x128 at 0x7F00EB3D0350>
the code supports reading and writing RGB images only (which is the only pixel layout currently supported by the WebP format). the only option is "quality" which ranges from 1-100 (0 being "default", which currently corresponds to 75). some examples:
>>> im.save("out.webp")
>>> os.path.getsize("out.webp")
3350
>>> im.save("out.webp", quality=50)
>>> os.path.getsize("out.webp")
2824
>>> im.save("out.webp", quality=20)
>>> os.path.getsize("out.webp")
1758
the current snapshot can be found in the development repository, as usual.
*) well, I ended up spending Monday there as well, which was less awesome -- the Swiss flight was cancelled due to mechanical problems, and then they had me stand in line for 3.5 hours to get a new booking. 24 hours later. yay! and when I finally made it to Zurich, SBB was late too -- it took 13 minutes longer than usual to make it home. outrage.
