2

I have about 500 images, I would like edit all of them in batch, I need to resize them all at to 190x120 dimensions, position then slightly higher (say 10 pixels). And export. Also I would like them all to keep their initial names.

Basically I have a frame and I would like to load images (on layer under it) then size them down (above dimensions) move slightly up and export each individual image with frame so that it keeps its name.

What would be a command I could use in GIMP console (script-fu or Python-fu)? Or what other method could I use to achieve the result without editing each image individually?

Thanks in advance!

John Smith
  • 851
  • 2
  • 10
  • 22
  • Why Gimp? Definitely something you can do with [ImageMagick's `mogrify`](https://www.imagemagick.org/script/mogrify.php) command, or, if you know Python, with the [`pillow` module](http://pillow.readthedocs.io/en/3.0.x/reference/index.html) – xenoid Mar 21 '17 at 13:13
  • Say I download ImageMagick, still the question is, what would be the command that I could achieve the effect with? – John Smith Mar 21 '17 at 13:41
  • 1
    Not an IM expert so it would take me about as much time as you to figure that one out. But rephrasing and retagging your question with `[imagemagick]` will likely attract the right people (over 5.5K questions tagges such). – xenoid Mar 21 '17 at 15:04

1 Answers1

2

i altered one of my own python-fu scripts, and after some testing it seems to do what you want. the interface itself is pretty self-explanatory. just download the file and install it as a plug-in.

gist link: https://gist.github.com/MCOfficer/bdf6c0c0935d22da38e72cc99fea6375 (archive.md)

MCO
  • 1,187
  • 1
  • 11
  • 20
  • Thanks, I have installed it, but after processing, it gives me an error: http://imgur.com/a/PR5lp – John Smith Mar 21 '17 at 18:12
  • interesting, it worked for me o.o can you run `pdb.gimp_context_set_interpolation(0)` in the python-fu console before running the plug-in? this should disable the interpolation used by `image.resize`. – MCO Mar 21 '17 at 19:54
  • Actually error doesn't seem to affect anything, it just shows up, while the images are being processed. The output is great, love the program name xD. How would I go about changing the movement of the picture (not frame)? – John Smith Mar 21 '17 at 19:59
  • with movement you mean what's currently 10px, right? you need to change the last value of the resize/scale functions. just ctrl-f search for `# now the actual work`, and edit the following two lines. example: for a shift of 15px, i would change the -10 in `image.active_layer.scale` to a -15, and the 10 in `image.resize` to a 15. sorry but i can't edit the answer itself from my mobile – MCO Mar 21 '17 at 20:06