GNOME Bugzilla – Bug 61094
want ratio constraint in crop tool
Last modified: 2004-12-22 21:47:04 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.
*** Bug 71506 has been marked as a duplicate of this bug. ***
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.
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.
*** Bug 99139 has been marked as a duplicate of this bug. ***
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.
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.
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.)
*** Bug 125574 has been marked as a duplicate of this bug. ***
*** Bug 118775 has been marked as a duplicate of this bug. ***
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.
*** Bug 131111 has been marked as a duplicate of this bug. ***
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.
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 ***
Jamie is right in bug #156858 that one aspect of this bug (comment #7) hasn't been addressed yet.