Thursday, April 8, 2010

Gimp and python

So I was wanting to automate some stuff with some already compressed
.png image files, and turns out gimp can salvage them while Photoshop
can't.
There's some nice tutorials on how to do this but here's some notes I
hit along the way.


1- setting this up on windows is hard. OSX was easy and zi'm assuming
unix is too. Installing all the python extensions for this is a pain
and I didn't really ever get this going.

2-you need a good way to 'chmod' your file to make it executable. I got
'muCommander' for OSX which is free and awesome. A good stand in for Totalcommander for windows (previously windowsCommander)

3- documentation of commands in the reference for gimp shows '-' where
in python you use '_' instead. Also I didn't get named parameters
working, so you need to include a lot of inputs to many of the
commands.

4- I ended up setting up a output debug text file to output what I'd
normally put 'print' statements in for.

5-lots of restarting gimp as I worked on my code. Doing more rough
work in the gimp python-Fu dialog may have been a smarter way wo get
things working.

6- setting up a workplace in eclipse in the folder Gimp looks for
these scripts is a nice way to manage them. On OSX I think it's
Users//Library/Aplication Support/Gimp/plugins/


No comments:

Post a Comment