Yesterday I posted about my first little foray into image editing on Ubuntu. I started a little program called "photobomb". I received a comment on that post, suggesting that thought bubbles, and the ability to size and place them, would be a nice feature to add.
I was interested in discovering what it would be like to code that up, so I investigated a bit. It was immidiately apparent that while PIL is great for manipulating images as data, it was not designed to support manipulating images as objects on a screen. As I investigated, I discovered goocanvas. Goocanvas provides a widget like abstraction over SVG, and it is quite well integrated with Gtk, so I was fairly easily able to port photobomb to use goocanvas. It includes classes for images and paths.
I haven't been able to figure out how to write out an image file from the goocanvas, so actually saving the edited file is currently broken. But you can type in a thought and have it appear within a thought balloon, but I you can't size or place it yet.
Goovanvas has support built in for figuring out what item was clicked on, rotating it, scaling it, etc... It's really quite well suited for a photobomb app
While working with the goocanvas API, I realized that I've been here before. About three years ago, when Silverlight was new, and I cared about it, I created "TadaVinci" in Silverlight.
- Search for images and add them to a canvas
- Resize, rotate, and place those images
- "Scalpel" the images, which meant you could kind of carve them up
- Allow users to draw in different colors and pen thickness
- Adjust the translucency of any object on the surface
- automatically import pictures from Picture directory
- automatically import pictures for friends via Gwibber
- automatically import pictures from a web cam
- publish to facebook, etc... via Gwibber
- Lots of lolzy stuff, like a "breaking news" frame, etc..., stamps, etc...
Tomorrow morning I need to wake up and do my "real job" of managing the Ubuntu Desktop team. I've also got three other projects in the works Bughugger (which is a real work project), Quickly which is like 50% work and 50% person, and Quidets (all personal, but it really helps with Bughugger).
So I don't see myself resurrecting TadaVinci using goocanvas in the near future, but boy would it be cool.