Gimp-Forum.net
"Expand From Centre" does not expanded from centre - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: "Expand From Centre" does not expanded from centre (/Thread-Expand-From-Centre-does-not-expanded-from-centre)



"Expand From Centre" does not expanded from centre - BeachRat - 02-22-2021

I am having trouble with the rectangular selection boxes.

With the selection values in pixels, "Expand from Centre", and "Fixed" (any ratio).

If I select all, then manually input a horizontal or vertical value, the selection box jumps to some random offset in both vertical and horizontal dimensions, and includes a large area outside the image.

If I grab the edge of the box with the mouse and move it any amount then input either dimension there is no problem.

This occasionally happens under other circumstances but this is 100% repeatable.


RE: "Expand From Centre" does not expanded from centre - rich2005 - 02-22-2021

Not able to reproduce that: One minute demo https://i.imgur.com/Xvlgwog.mp4 Everything works, direct entry, size or position + gimp arithmetic. This a Gimp 2.10.22 appimage and kubuntu 18.04

What linux distro you using ? Which version of Gimp you using ?


RE: "Expand From Centre" does not expanded from centre - Ofnuts - 02-22-2021

AFAIK Expand from centre is for mouse moves only. The position/size fields in the tool options are always for top-left corner and complete size. Note that you can do some arithmetic in these fields, for instance in a 400x300 image you can do create a 200x100 centered selection with by entering:

Code:
Position
(400/2)-(200/2) and   (300/2)-(100/2)
Size
200 and 100

When you strike [enter] Gimp does the computation and shows the result in the field.

In other words, Xcenter-(Xsize/2)), YCenter-(YSize/2).


RE: "Expand From Centre" does not expanded from centre - rich2005 - 02-22-2021

Go on, just for once have a look at the video demo https://i.imgur.com/Xvlgwog.mp4


RE: "Expand From Centre" does not expanded from centre - BeachRat - 02-22-2021

Your demo is very nice, but does not begin to address my problem.

My distribution is Slackware.

I have been using Gimp for almost 20 years, with releases 1.2, 2.2, 2.4, 2.6, 2.8.

I am describing new behaviour with 2.10.

1. select the rectangular selection tool
2. from the drop-down menu, Select => "All"
3. ensure "Expand from centre" is selected
4. ensure "Fixed" aspect ratio is selected (any value here, but "Current" will suffice)
5. click once on the image to activate the selection
6. The position fields now read 0,0. DO NOT enter any values here
7. In "Size" manually input (in either box) any value smaller than is displayed
8. "Enter"

9a. Expected behaviour, true of all previous releases before 2.10: the selection box is reduced in size on a common centre.

9b. New behaviour with 2.10, the selection box is produced at the proper dimensions but the centre is now offset from the original position in both horizontal and vertical dimensions.


(02-22-2021, 09:05 AM)rich2005 Wrote: Go on, just for once have a look at the video demo https://i.imgur.com/Xvlgwog.mp4



RE: "Expand From Centre" does not expanded from centre - rich2005 - 02-22-2021

Thanks for the detailed explanation. The problem is exactly as you describe. Using kubuntu 18.04 / Gimp 2.10.22 ( & works as expected using Gimp 2.8)

No Gimp developers visit this forum. You can post a bug report here: https://gitlab.gnome.org/GNOME/gimp/-/issues


RE: "Expand From Centre" does not expanded from centre - BeachRat - 02-22-2021

(02-22-2021, 05:37 PM)rich2005 Wrote: Thanks for the detailed explanation. The problem is exactly as you describe. Using kubuntu 18.04 / Gimp 2.10.22 ( & works as expected using Gimp 2.8)

No Gimp developers visit this forum. You can post a bug report here: https://gitlab.gnome.org/GNOME/gimp/-/issues

Thanks anyway, I was hoping there was perhaps a setting with an inscrutable name somewhere.


RE: "Expand From Centre" does not expanded from centre - BeachRat - 02-24-2021

Quick work from the GIMP developers.

Quote:Fixed in master and backported to gimp-2-10:

commit f63086bd5ae12a60301c749f5fdacda9afeee705 (HEAD -> gimp-2-10, origin/gimp-2-10)
Author: Stanislav Grinkov <43956-stanislavgrinkov@users.noreply.gitlab.gnome.org>
Date:   Wed Feb 24 20:57:09 2021 +0600

   tools: Rectangle select. Incorrect center_xy after converting channel selection to rectangle
   
   Was caused by widget tool fixed_center_x and fixed_center_y coordinates set to
   coordinates of mouse click instead of rectangle center after converting channel
   selection bbox to rectangle.
   
   Now rectangle fixed_center_x and fixed_center_y coordinates are always updated
   when tool widget x1, x2, y1, or y2 coordinates are updated.
   
   Closes #6487