Re: [Gimp-user] Adding text to many files.

2009-01-09 Thread Rolf Steinort
On Thu, 2009-01-08 at 19:53 -0800, Bernard Rankin wrote:

 I'm kinda familiar with Python as a web scripting language, but I've never 
 used it for a GUI or as a plug-in language.
 
 How involved is writing a GIMP plug-in?  
 

It's really easy. The main problem is to get the script into the right
directory with the right permissions. ;-)

If I am allowed to plug my own stuff here - have a look at
http://forum.meetthegimp.org/index.php/board,12.0.html for examples,
http://forum.meetthegimp.org/index.php/topic,202.0.html for how to start
and even at http://meetthegimp.org/episode-038-a-phython-in-a-barrel/ a
video on a really beginner level. But as you know your way around Python
you'll don't need that one. 

Rolf

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Adding text to many files.

2009-01-09 Thread Bernard Rankin
  How involved is writing a GIMP plug-in?  

  
 
 It's really easy. The main problem is to get the script into the right
 directory with the right permissions. ;-)
 
 If I am allowed to plug my own stuff here - have a look at
 http://forum.meetthegimp.org/index.php/board,12.0.html for examples,
 http://forum.meetthegimp.org/index.php/topic,202.0.html for how to start
 and even at http://meetthegimp.org/episode-038-a-phython-in-a-barrel/ a
 video on a really beginner level. But as you know your way around Python
 you'll don't need that one. 
 


Thanks I'll look at those...


  

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Adding text to many files.

2009-01-08 Thread Michael J. Hammel
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 1x1 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
each image).

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. HammelPrincipal Software Engineer
mjham...@graphics-muse.org   http://graphics-muse.org
--
Idiocy:  Never underestimate the power of stupid people in large crowds.

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Adding text to many files.

2009-01-08 Thread Bernard Rankin
  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 1x1 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.
 

Thank you for the help.

These photos need to be printed as a hard-copy... hence the need to downsize to 
4x6@300ppi 

I'm kinda familiar with Python as a web scripting language, but I've never used 
it for a GUI or as a plug-in language.

How involved is writing a GIMP plug-in?  

For the overlay, Is is possible to simply make a template GIMP file, replace 
the text field values as needed, and merge with a resized version of the base 
file?  

 
 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.  
 

I'll check out ImageMagick.. thanks for the lead.  Ideally, I'd still like to 
create the template overlay file in GIMP, though. (If imagemagick supports such 
a thing... )


  

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user