On Thu, 2009-01-08 at 15:26 -0800, Bernard Rankin wrote:
> I'm sure this must be a common question, but I could not find any docs on
> this. Perhapse my google skills needs improvment.
It's common to need a feature like this but the solutions vary depending
on the environment in which the image will be used. To my knowledge
there are no off-the-shelf GIMP plugins/filters that provide the
functionality you're requesting. That doesn't mean one doesn't exist.
I've just not heard of any.
> Basically, I've got a bunch of pictures from a party/event that I want to do
> several things to:
> 1) Resize to 4x6 @ 300 PPI
> 2) Add a sllightly transucent ~ 1" white bar on top of the image (accross
> the bottom).
> 3) Over the white bar, on the left, place a small 1"x1" logo.
> 4) Over the white bar, centered on the remainder, put the names of the
> people in the photo. (Reducing text size if needed to fit on one line.)
> 5) Over the white bar, centered on the remainder, put the name of the event
> on the next line.
> 6) Add a black border to entire image.
> 7) Export as JPEG.
> There is a CSV file that contains the "names of the people in each photo" to
> file name mapping. (One line per image file.)
> Can this be automated with the GIMP?
Yes, if you're familiar with one of the programming languages supported
for GIMP Plugins (C, Python, Script-Fu by default - there may be
others). You'll need to become familiar with the plugin API. In 2.6,
look under the Help menu for "Procedure Browser". The way you use these
is dependent on the language you choose.
If you intend to use these images on the web you might be better off
using dynamic support for this feature, such as what you see with
NextGen Gallery, a plugin for Wordpress (blogging software for the web).
On the web you can use code to overlay text onto graphics without
actually modifying the image itself. In this way you can edit the text
displayed without having update the image. For an example of how this
works you can view my Dept 56 Galleries:
http://www.graphics-muse.org/wp/?page_id=119 (view these with the
PicLens option to see the overlaid text in the upper right corner of
Another option is to use an image management tool like f-Spot or
similar. Many of these offer builtin options to do exactly what you're
asking, though they may not be as flexible in how they composite the
text onto the image as you require.
However, if you really do need to update the image itself and you want
to program it yourself, you might find it easier to automate this with
ImageMagick. The advantage to this option is that it's more scripted
from the shell and doesn't require running a UI interface. GIMP can (I
believe - I never use it this way) be run without the UI but I'm not
sure it's particularly easier to script in this way.
That said, you'll get excellent results using the GIMP's plugin API.
You'll end up writing a file browser of some kind to select files,
specify the input CSV file and then have the plugin open, edit and save
the files all without actually displaying them (to save time).
Hope that helps a little.
Michael J. Hammel Principal Software Engineer
Idiocy: Never underestimate the power of stupid people in large crowds.
Gimp-user mailing list