GNOME Bugzilla – Bug 508183
Crop tool to once again display selection aspect ratio along with size (in status?)
Last modified: 2012-09-03 10:54:33 UTC
Like many, I use gimp to resize images for photos. A lot of time gets spent cropping. Previous versions (2.2) used to open a clumsy yet informative dialog on crop as now appears more succinctly in the tool info (thanks!). However, the current aspect ratio of the selection is no longer shown. I can preselect a fixed one (handy yet this this is a "fancy" feature in comparison). I can also see the dimensions of my selection in pixels/mm/picas in TWO places (in the tool info, and at the bottom of the image window in the status bar "Rectangle: 34x453"). I can display the size of my selection in several fancy ways, but not its aspect any more. It would be a trivial change to put the aspect ratio into the status format string "Rectangle: 2342x4543 Aspect: 1.543" Even if shared with all rectangle selections, it would be helpful information. If that's not ok, is there some way it can be resurrected in the crop tool info? When you want to print/paint a photo, you want the flexibility to drag a rectangle around and figure out whether you should crop to a 1:1 or a 2:3 or a 3:4 or 4:5, etc on the fly. Who knows what the best image crop is! This would address most of entry #156858. You don't really need complicated preselected aspect ratios if you can just see your current. I've been using GIMP since 1996. Thanks, guys, it's amazing.
Yeah, I never understood the rationale behind the decision of the UI team to hide this information and display "Current" instead. The reasons are probably outlined in http://gui.gimp.org/index.php/Selection_%2B_crop_tool_specification. Let's set this on the 2.6 milestone and see if we can do anything about it.
(In reply to comment #1) > Yeah, I never understood the rationale behind the decision of the UI team to > hide this information and display "Current" instead. The discussion leading up to this can be followed in bug #479999. Showing the aspect ratio in the status bar does sound useful and it would indeed be trivial to do. I'll hack up a patch for that this weekend (unless someone else does it before me).
Seriously, the status-bar is not really a good place for this. It's fine to also display it there but I would like to keep this report open until Peter has seen it.
Ah, thanks. I checked the impressively extensive crop tool redesign spec docs mentioned, but did not find mention of displayed aspect. I imagine people just forgot to bring it over. I probably would. I was using GIMP again and severely missing this again. OK, if the status bar isn't a good place for it, what is? 1. The crop/select tool option area is a schmorgasboard of widgets. All of them are editable controls. Adding an aspect label widget there would not only add to the clutter, it would be functionally out of place. If added as an editable text field, then the question is-- what would happen if it were edited? Would width or height first be consulted as an input? What about zero? Since it is a combination of X,y/width,height it doesn't fit in the Position:/Size: area. Shoving it into the editable field below Fixed: area in Aspect Ratio does not really work, since reporting 453:734 is not actually useful. Adding it here is Complicated. Complicated things rarely get done for good reason. 2. The lower left hand corner of the document window is for X,Y information and reports mouse coordinates. This does not belong here, or in zoom information. The point of a status bar is to concisely describe useful information about the current action. It sounds exactly like what we have here to me. Does using the white space in the status bar to the right of "Rectangle: 342x643" constitute clutter-- especially since that only displays during mouse drag operations? Thanks, Tim
Sven is right, why hide it in the status bar... I got a solution for you and it is made with cairo: While rubber-banding, display rect size (hmmmm, units) and aspect ratio on the canvas, right in the middle of the rect. when the rect is too small, display outside the rect (algorithm too subtle to elaborate here). background of this display area can be something like 80% opaque black, text 100% opaque white. text size neither too small (9pt) nor too big (36pt). it would be cool if the ratio would find useful integer ratios (2:3), although there is a threshold somewhere were it stop being enlightening (107:37 is not). what do we think..?
I like it, we just need to fix Cairo drawing for tools first.
Why don't you just show the ratio in the status-bar instead of bumping this to the next release?
Created attachment 111675 [details] [review] rectangle-tool-aspect-ratio-in-statusbar-2008-05-28.patch Patch that uses the same logic as the number pair entry for converting rectangle ratio to nom:denom, and showing it in the status bar. With the above simple approach, it isn't very useful unfortunately. It is hard to get a "feel" of the aspect ratio just by looking at the numbers provided. In order to make this useful, it will be necessary to implement a more complicated logic. Let's bump this to 2.8.
Wait! Wonderful! Thank you, that's indeed the change. Except one small thing, I agree, "432:643" is highly confusing whereas 432/643 = "0.657" would be incredibly useful, what used to be there, and why this whole feature request was made. Ah, it's so hard to see it come so close then miss! What about simplifying down to the following? I imagine you'd want a digit constraint on the printf for h/w here as well. Then I wouldn't have to go to emacs and eval "(/ 1839.0 2163.0)" each time to get an aspect ratio on my selection, then reiterate until I get close to the desired, which is noticeably clumsy. Thank you! Index: app/tools/gimprectangletool.c =================================================================== --- app/tools/gimprectangletool.c (revision 25834) +++ app/tools/gimprectangletool.c (working copy) @@ -1074,8 +1074,27 @@ gimp_rectangle_tool_motion (GimpTool h = pub_y2 - pub_y1; if (w > 0.0 && h > 0.0) - gimp_tool_push_status_coords (tool, display, - _("Rectangle: "), w, " × ", h, NULL); + { + gchar *aspect_text; + + aspect_text = g_strdup_printf (_(" Aspect ratio: %g"), + w / (gdouble) h); + + gimp_tool_push_status_coords (tool, display, + _("Rectangle: "), w, " × ", h, aspect_text); + + g_free (aspect_text); + } }
Oh then I misunderstood. The plain aspect ratio is indeed more useful. Let's go for that in 2.6. I'll use the string " .2f" instead of " Aspect ratio: %g" though since the former results in considerable less status-bar noise. It should be obvious to users that the number is the aspect ratio. Commited to trunk, rev 25847: 2008-05-29 Martin Nordholts <martinn@svn.gnome.org> * app/tools/gimprectangletool.c (gimp_rectangle_tool_motion): Also show the plain aspect ratio in the status bar along with the rectangle size information. It would be nice if the aspect ratio information had a constant position in the statusbar so it wouldn't jump around when the size of the rectangle changes, but let's consider the current approach a quickfix and go for a real solution in 2.8.
True, it should be obvious what it is without the " Aspect ratio: " tag. Nice. Ah, fabulous. Thank you. I'm looking forward to using it.
We should display this on-canvas using ciaro. Moving to 2.10.
Low priority compared to things on our roadmap
It is displayed in the status bar now, good enough. Everything else is an enhancement and needs to be speced out anyway.