After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 61094 - want ratio constraint in crop tool
want ratio constraint in crop tool
Status: RESOLVED DUPLICATE of bug 131111
Product: GIMP
Classification: Other
Component: User Interface
git master
Other All
: Normal enhancement
: Future
Assigned To: GIMP Bugs
GIMP Bugs
: 71506 99139 118775 125574 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-09-24 21:49 UTC by Jamie Zawinski
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jamie Zawinski 2001-09-24 21:49:49 UTC
When I'm setting up image galleries, I often try to make all the
images be the same size.  This means I often take large images and
crop/scale them.  It's kind of a hassle to ensure that I end up
with an image that is exactly the size I want: I end up cropping
a section out of a large image that looks to be about the right
shape; then scaling it to be (say) 800 wide; then cropping it
again to make it be 600 tall.

It would be easier if there was a way to constrain the ratio on
the crop tool: if I could tell it, "I want to crop a section out
of this image, but I want that cropped section to be the same shape
as the original image", then I would be sure to end up with images
that were the ratio I wanted.

I'm not sure what the best UI for this would be, but I'm spoiled by 
the constraints the scale tool gives me, and I keep wishing for
something similar in the crop tool.
Comment 1 Sven Neumann 2002-08-28 04:36:12 UTC
*** Bug 71506 has been marked as a duplicate of this bug. ***
Comment 2 Dave Neary 2002-08-28 06:57:07 UTC
Just wondering - do you know that you can constrain the ration of
width to height for a rectangular selection, and then crop from the
selection?

To do that, open up the Rect Select options, toggle "Constrain
size/aspect ratio", and set the ratio to the value you're looking for
(eg height 2, width 3). Then start to drag out a selection (it'll stop
at 3x2 pixels), and hit shift (without letting go the mouse button)
and you get a ratio-constrained rect selection. Then with the crop
tool, click the "From selection" box after you start the crop, and
you're done.

Is this good enough for you?

Cheers,
Dave.
Comment 3 Raphaël Quinet 2002-08-28 07:29:01 UTC
Maybe that would be good enough for jwz, but not for me.  ;-)  So I
would like to keep this bug report open.

The crop tool offers some nice features such as the ability to change
the position or size of the region to be cropped using either the
small handles in the corners of that region or the spinbuttons in the
crop dialog.  These small handles are very nice for beginners because
they provide a visual hint about what the user can do there and this
is usually better than using modifier keys such as Alt or Shift (see
also bug #51108).  Also, it is convenient to use the spinbuttons for
fine adjustments of the position or size of the region.  Although
this could also be done with the selection tool by using the arrow
keys, this does not work for some users because their WM grabs these
keys (this seems to be a common problem according to the bug reports
seen here and in the c.g.a.gimp newsgroup).  So it would be better if
the fixed aspect ratio constraint could be added to the crop tool so
that the user would not have to juggle with two tools.
Comment 4 Dave Neary 2002-11-21 08:45:05 UTC
*** Bug 99139 has been marked as a duplicate of this bug. ***
Comment 5 Alan Horkan 2003-07-23 18:41:35 UTC
Changes at the request of Dave Neary on the developer mailing list.  
I am changing many of the bugzilla reports that have not specified a target
milestone to Future milestone.  Hope that is acceptable.  
Comment 6 Ed Halley 2003-10-16 18:27:19 UTC
I was about to add another request like this one (but saw the other 
RESOLVED DUPES).  So I'll add my two bits here.

Here's how I would add this feature.  While dragging the NW or SE 
corner, just support the regular meta-key constraints to hold the 
aspect constant.

Additionally, in the crop info dialog box, I'd like to see the 
current crop aspect numerically.  If it's very close to a known low-
integer ratio, show that as well:  "Aspect:  1.33333 (3:2)."  If the 
meta-keys are held at the time this low-integer ratio is found, then 
the aspect should SNAP to that low-integer ratio and then continue 
being maintained.

What low-integer ratios are desirable?  You can preload a lookup with 
(n:m) and (m:n) from 1 to 9, and/or you can scan the user's existing 
list of file templates.

Why is this useful?  Load a dozen (or two hundred) 3:2 images from a 
digicam, and crop down to the nicest 7:5 cropping for printing on 5x7 
photo paper.  You'll want to make this process much easier.

Comment 7 Jamie Zawinski 2003-10-23 08:14:26 UTC
So, I just saw how iPhoto does this on MacOS, and it's pretty sweet.
The crop tool has an option menu on it with these choices:

    None
    Display (1280 x 1024)
    4:3 (Book, DVD)
    4:6
    5:7
    8:10
    4:3 Portrait
    4:6 Portrait
    5:7 Portrait
    8:10 Portrait
    Square

and when you select one of those, it constrains to that ratio.

I think that'd be a *lot* easier and more convenient than the meta-key
constraints (though I think those should probably be available too.)
Comment 8 Sven Neumann 2003-10-27 16:39:22 UTC
*** Bug 125574 has been marked as a duplicate of this bug. ***
Comment 9 Sven Neumann 2004-01-22 15:25:11 UTC
*** Bug 118775 has been marked as a duplicate of this bug. ***
Comment 10 joe-gnome-org 2004-01-22 19:34:43 UTC
I have a similar, if not identical, need: I open an image with the
intention of cropping it to a certain pixel width w and height h.  I
would like to enter these two numbers into a dialog box and then be
able to drag out a crop tool (much like the existing crop tool) that
restricts its size to the same ratio as w:h.  Ideally, when I click in
the middle of the tool to execute the crop, it would crop AND scale
the image to that pixel size.

If there were a tool that supported only the ratio-constrained
cropping, perhaps the crop-and-scale combo could be implemented as a
script or a plug-in.
Comment 11 Pedro Gimeno 2004-01-23 10:22:01 UTC
*** Bug 131111 has been marked as a duplicate of this bug. ***
Comment 12 Pedro Gimeno 2004-01-23 10:24:52 UTC
There's a patch adding this feature in bug #131111. Bug #132274 is 
asking for the same feature but applied to the Scale tool. I've asked 
the creator of the patch for a modification to also support the Scale 
tool in it.
Comment 13 Dave Neary 2004-01-23 10:51:15 UTC
Given that the patch is attached to the other bug (bug #131111) it
makes sense to have this bug marked as a duplicate of that one.

Dave.

*** This bug has been marked as a duplicate of 131111 ***
Comment 14 Sven Neumann 2004-10-29 22:25:43 UTC
Jamie is right in bug #156858 that one aspect of this bug (comment #7) hasn't
been addressed yet.