Script to place overlays on images
Posted 21 October 2012 - 08:44 PM
i need a script to perform the following task:
Load a PNG image.
Load another (smaller) PNG image and place it as an overlay on the first one (it has transparent parts).
Then save the whole as a new PNG image.
This has to be done for a lot of images.
The first images are all of same size (32x32),
the second ones are smaller.
The position where to place the overlay is not always the same, so i plan that the info about which image to use and where to place the overlay could be provided in a csv file like:
backgroundimage-name, overlay-image-name, position-x, position-y
The script should go through the list and perform the task fully automated. This should be done from a command line if possible, so that the script itself can be part of scripted build process.
Does anyone have a similar script or can help develop it?
If not, how do i start quickly?
I am familiar with Python, (not with Script-Fu Lisp).
I am completely new to GIMP scripting however.
I read the "Python and Gimp" sticky section, but it seems outdated.
Posted 22 October 2012 - 04:09 PM
The GIMP Python documentation isn't a bad place to start to learn GIMP scripting: http://www.gimp.org/...thon/index.html and GimpChat has a list of scripting resources: http://gimpchat.com/...c.php?f=9&t=724
Although it must be said that your comment about running from the command line tends to suggest that ImageMagick might be your best solution. http://www.imagemagi...cript/index.php
Posted 23 October 2012 - 07:27 AM
thanks for the suggestion.
But i figured out it will probably be easier to go directly with the Python Image Library.
Then i won't need any external program (including Gimp).