GNOME Bugzilla – Bug 165330
brightness-contrast adjustment by mouse-dragging
Last modified: 2006-01-05 11:26:55 UTC
I was working recently with a medical imaging program that allowed brightness-contrast adjustments to be made by clicking on the image and dragging the mouse -- vertical changes brightness, horizontal changes contrast. This seemed like a nice feature, and not too complicated, so I have coded it up -- a patch is attached below. The UI probably could use a little tweaking, but basically it seems to work pretty nicely.
Created attachment 36562 [details] [review] patch for app/tool/gimpbrightnesscontrasttool.[ch]
Hmm, is it really a good idea to add more hidden features while we are actually trying to remove them (see bug #51108) ?
I agree with your general point, but I feel that the gain in usability here is strong enough to override it. Once you try it, you may never touch touch those sliders again. It is of course worth thinking about how to make the feature more visible.
It would help if you provide screenshots and explain exactly what is going on when the tool is used - am I assuming correctly what intead of doing nothing with the current tool, dragging the mouse in the image now moves the sliders in the brightness-contrast tool dialog? There are people out there who can't or don't want to build current CVS, and giving them at least a general idea of what is considered for future versions of GIMP will help to make the development process less "magic" (and probably more appealing -> contributors) for them.
This is not in CVS (in case that wasn't clear). A screenshot would not show anything that looks different from what you see now. The idea is that you click anywhere on the image and move the mouse while holding the left button down. Upward movements make it brighter, rightward movements increase the contrast. The sliders on the dialog move at the same time, and if you have previewing enabled, you see the preview change while you move. You can release the mouse button and click again and drag to alter the values.
Where exactly is the benefit of dragging in the image compared to dragging sliders?
You could adjust both parameters simultaneously, which might be more convenient.
The reason why I am somewhat reluctant to accept this as a good idea is that I think that all colormap tools should provide color information. Hovering over the image should give information (for example in the statusbar) about the color under the cursor, before and after applying the colormap. Overloading the mouse with other functions might make it difficult to add this.
Re comment #6, when you use the sliders, if you need to alternate between brightness and contrast adjustments (which is almost always the case), your eye is constantly traveling back and forth between the image and the dialog, and each time you switch sliders, you must make a high-precision mouse movement. With click-and-drag, your eye stays on the image, and you can click on it at any point, and, as Simon pointed out, you can adjust both parameters simultaneously. Re comment #8, I don't really see the problem with alternating between one function when the left mouse button is pressed and another function when the mouse is hovering -- just about every tool does this. That's what the mouse buttons are for, isn't it?
I tried this patch and I like the results (despite the fact that I reported bug #51108). Some comments: - It looks like the interactive usage can go beyond the -127, +127 range (maybe it wraps around, I haven't checked) without updating the sliders. When you are already at full scale, further movements are still affecting the image. - As the tool is now interactive, some users may be confused about whether the effect is immediate or whether they still have to click OK (yes). The risk for confusion should be minimal, though. - The preview updates are a bit slow for very large images, but that cannot be avoided.
Let's consider it for 2.4 then.
Comment on attachment 36562 [details] [review] patch for app/tool/gimpbrightnesscontrasttool.[ch] could need some tuning (see Raphaels comments)
Okay, after fixing the first problem described in comment #10, and some months of additional testing, I have committed this change. I have also updated the Help documentation to describe it, and will commit that change shortly. 2005-05-31 Bill Skaggs <weskaggs@primate.ucdavis.edu> * app/tools/gimpbrightnesscontrasttool.[ch]: Allow tool to be operating by clicking and dragging inside the image, as described in bug #165330. It might be adding a status message to give the user a hint about the possibility of doing this, as well.
For gimp-help-2, from the ChangeLog: 2005-05-31 Bill Skaggs <weskaggs@primate.ucdavis.edu> * src/toolbox/tool-brightness-contrast.xml: Improve English text, and add info about new functionality in GIMP 2.4: ability to operate tool by clicking and dragging in the image, as described in bug #165330.
I strongly suggest that you revert the change to gimp-help-2. As far as I know the help team hasn't yet started to document the upcoming 2.4 release and IMO it is way too early to do that right now. Please let's not do the same mistake again and keep documenting the stable gimp version until we have API-frozen gimp for 2.4.
*** Bug 325799 has been marked as a duplicate of this bug. ***
I reported the dup above, and I don't have time right now to compile gimp from CVS, but I would offer the following comments: Re comment #2: I don't think this should be a hidden feature -- there should be some text at the bottom of the Contrast/Brightness dialog saying that the user can also drag on the canvas to modify brightness/contrast. This also applies to comment #10 -- there should probably be a note in the dialog stating that the user has to click "OK" to apply the changes. Re comment #6: There is a huge benefit to this feature, it allows a 2D search through the parameter space of contrast/brightness adjustment, not just a set of 1D searches. The problem is that the optimal setting of brightness and contrast that the user is looking for is not obtainable by choosing the right value for one parameter (e.g. brightness) and then the optimal value for the other parameter, because the subjective effect of each of the parameters is not independent of the other. You have to keep going back and forth from one param to the other until you home in on the correct settings of both that work the best together. This is an important solution to a long-standing usability problem. I was astounded when I saw this feature in medical s/w, because it works so well and is such a simple concept. Re comment #8: perhaps the actual and previewed color values should be displayed simultaneously if the previewed color for the current pixel is not equal to the actual color in the image at that point? That may help with other things too. Final comment: I would love to see this in other dialogs that make sense too, like the HLS dialog. (Did I miss a mention that this is already mentioned, above?) If there are more than 2 parameters in the dialog, Shift/Ctrl could be used to select the less-important parameters. e.g. Lightness/Saturation could be the default params that are modified on drag, and holding Shift changes it to Lightess/Hue (or just Hue, and one dimension of the drag could be ignored). Thanks, I'm glad someone beat me to this, this is going to be a great feature. I adjust brightness and contrast all the time in digital photos.
This bug is closed. Please open new ones, one for each independent improvement request.