Related Entries

India PyCon 2009
Quick wallpaper changer
Load testing with Grinder
Adding namespace to XML
Opera RSS to OPML

« DHCP timeout
» PHP & Oracle performance

Pygick

A GUI using PythonCard to make scripts utilizing PythonMagick library to manipulate batches of images.

I wanted to find out how quick PythonCard is, to learn and use. Answer - it is the quickest to make GUIs! Then I thought about what kind of application I can write. Making a easy to use batch image processor seemed like a good idea. I vaguely remember seeing an application like this - so whatever I could remember from that applications' GUI as a base, made an application. I used PythonMagick, a library for ImageMagick functions.

Warning! There is no real use for this as yet.

Startup screen
Startup Screen

I also wanted to tryout Python’s introspection features. The file imageCommands.py has a list of functions, wrappers around PythonMagick libraries. introspectCommands.py is a simple introspecter that uses information at run time to find parameters for commands.

Then it was a simple matter to make a dynamic dialog window. paramDialog.py takes a function as the argument and makes a form based on parameters to the function. No validation yet, but it was fun to code.

Dialog editing parameters for a command
Changing Parameters

Left panel has a list of all available commands. A sample image to test commands is available in the bottom-left corner. You can select a command from the list and click on Test to test the effect. If you choose to add the command to your script, you will get a dialog where you can set the options of the command, if it has any option. You can move selected command in your script up or down. Test Script allows you to run the script on the sample image. You can always revert back to original sample image.

After testing a command
Testing Command

I’m not going to get much time to work on this in the near future. I’ve uploaded this to CVS - if you are interested, go ahead and get it. I’m not promising any support!

At the moment, this may only have only educational and amusement values. See TODO list for what I think might make this useful.

  1. The CVS URLs are broken. Would you mind fixing it since it would be interesting to look at the source.

    Posted by: Dan on February 12, 2003 07:54 AM
  2. The CVS folders were deleted. I've restored it from my backup.

    Thanks!

    Posted by: Babu on February 12, 2003 05:48 PM
  3. Howdy. If you've successfullly compiled PythonMagick binaries for Linux, would you please consider posting them to Achim Domma at http://pythonmagick.procoders.net so he can make them available to others? Some of us have had trouble compiling the source for Linux (because we're not C programmers and don't really know what we're doing) and we'd really like to use the library!

    Thanks,
    Martin

    Posted by: martin doudoroff on March 18, 2003 03:37 PM
  4. I tried a bit with boost libraries required for compiling this in Linux and got so tired of it - around Nov 2002. After that I switched to using PythonMagick on Windows. So, I don't have pre-compiled binaries for Linux yet.

    Posted by: Babu on March 19, 2003 10:12 AM
  5. Hi, I'm also playing with PythonMagick and I'm trying to display an image on a wxPanel with no success. How did you convert PythonMagick image to wxImage?

    Posted by: Bob on April 17, 2003 04:21 PM
//-->