RSS/Atom feed Twitter
Site is read-only, email is disabled

bounds of selection outside a image

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

bounds of selection outside a image Tetsuya YUASA 02 Aug 02:28
  bounds of selection outside a image Ofnuts 02 Aug 19:36
Tetsuya YUASA
2013-08-02 02:28:28 UTC (over 11 years ago)

bounds of selection outside a image

Hello,

I want to crop several images in same aspect ratio. So I checked "Fixed" option and set proper values in tool box.

And sometimes I want to complement image with background color if selection is larger than original size.
I this case, I add a larger layer bottom of the image and crop it.

But it would better if I can do it by one action. Therefore I'm trying to write a script-fu for it, but I'm stuck now.

Because a function `gimp-selection-bounds` returns points only inside of the image even if the selection is outside of image.

Is there a way to get bounds of selection outside of a image by using script-fu?

--
Tetsuya Yuasa

Ofnuts
2013-08-02 19:36:21 UTC (over 11 years ago)

bounds of selection outside a image

On 08/02/2013 04:28 AM, Tetsuya YUASA wrote:

Hello,

I want to crop several images in same aspect ratio. So I checked "Fixed" option and set proper values in tool box.

And sometimes I want to complement image with background color if selection is larger than original size.
I this case, I add a larger layer bottom of the image and crop it.

But it would better if I can do it by one action. Therefore I'm trying to write a script-fu for it, but I'm stuck now.

Because a function `gimp-selection-bounds` returns points only inside of the image even if the selection is outside of image.

Is there a way to get bounds of selection outside of a image by using script-fu?

--
Tetsuya Yuasa

The selection is always clipped to the canvas. The selection tools may let you define an area that has parts outside of the canvas because it makes a lots of things easier, but the final result is clipped.

For what you want, crop the image, and let the script figure out what to do to put the image in the proper aspect ratio (which can be a script parameter or hard-coded).