Frank Barknecht writes:
> I have to do some tedious work, namely crop many images to four aspect
> ratios: 4:3, 3:4, 1:1 and 4:1. For each image I need to select
> the picture detail to preserve manually, so this cannot be automated.
[ ... ]
> I already saved some Tool Presets for setting the options to 4:3, 3:4,
> ... aspect ratios, but it seems, Tool Options can only be restored by
> using the Mouse, which I'd like to avoid as much as possible. Is there
[ ... ]
> Any other hints how to make my job less tedious?
I do that a lot too -- making desktop backgrounds for monitors of
several different sizes -- and I'm always irritated by how many steps
I had never actually used those Save Tool Options presets, and your
message made me look into them -- I should have done that long ago!
It helps with the most tedious step. But still, there are quite a few
steps left, so it's still tedious. Getting this far inspired me to
try to automate more of the job, and the result is a python script:
The script has a list of resolutions it knows about (1680x1050,
1024x768, 1366x768 and so forth). You use rect select in the
original image (using tool presets to set the aspect ratio
correctly) and make a rectangular selection. Then call the script,
which registers in Image->Selection to Wallpaper. The script
compares its list of resolutions with the selection's aspect
ratio and picks the closest one. Then it copies the selection,
pastes it as a new image, and scales it to what it thinks is the
right size based on the aspect ratio. The original image is still
there so you can go back and do the next size/aspect ratio.
I know your task is a little different -- you don't have the Scale
step, so my script might not help you much. And using rect select
isn't really as good as using crop, because rect select doesn't stop
at the edges of the image, so you have to be super careful not to go
over when you make the selection. (I'll probably add something to
the script to correct for that, as well as adding something to save
automatically to a directory chosen based on the size.) But I thought
I'd share the script since it might give you ideas, or might help
someone else who does desktop backgrounds like I do.
Gimp-user mailing list