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 165330 - brightness-contrast adjustment by mouse-dragging
brightness-contrast adjustment by mouse-dragging
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: Normal enhancement
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
: 325799 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-01-26 19:05 UTC by weskaggs
Modified: 2006-01-05 11:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for app/tool/gimpbrightnesscontrasttool.[ch] (10.72 KB, patch)
2005-01-26 19:06 UTC, weskaggs
needs-work Details | Review

Description weskaggs 2005-01-26 19:05:57 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.
Comment 1 weskaggs 2005-01-26 19:06:58 UTC
Created attachment 36562 [details] [review]
patch for app/tool/gimpbrightnesscontrasttool.[ch]
Comment 2 Sven Neumann 2005-01-27 16:46:19 UTC
Hmm, is it really a good idea to add more hidden features while we are actually
trying to remove them (see bug #51108) ?
Comment 3 weskaggs 2005-01-27 17:44:41 UTC
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.
Comment 4 Michael Schumacher 2005-01-27 17:59:18 UTC
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.
Comment 5 weskaggs 2005-01-27 18:47:53 UTC
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.
Comment 6 Sven Neumann 2005-01-28 11:55:53 UTC
Where exactly is the benefit of dragging in the image compared to dragging sliders?
Comment 7 Simon Budig 2005-01-28 14:13:36 UTC
You could adjust both parameters simultaneously, which might be more convenient.
Comment 8 Sven Neumann 2005-01-28 14:58:23 UTC
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.
Comment 9 weskaggs 2005-01-28 17:48:41 UTC
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?
  
Comment 10 Raphaël Quinet 2005-01-28 18:06:24 UTC
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.
Comment 11 Sven Neumann 2005-02-10 01:58:55 UTC
Let's consider it for 2.4 then.
Comment 12 Sven Neumann 2005-03-05 01:03:37 UTC
Comment on attachment 36562 [details] [review]
patch for app/tool/gimpbrightnesscontrasttool.[ch]

could need some tuning (see Raphaels comments)
Comment 13 weskaggs 2005-05-31 19:38:18 UTC
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.
Comment 14 weskaggs 2005-05-31 19:43:45 UTC
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.
Comment 15 Sven Neumann 2005-06-01 15:39:11 UTC
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.
Comment 16 Michael Schumacher 2006-01-05 02:04:35 UTC
*** Bug 325799 has been marked as a duplicate of this bug. ***
Comment 17 Luke Hutchison 2006-01-05 03:37:53 UTC
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.
Comment 18 Michael Schumacher 2006-01-05 11:26:55 UTC
This bug is closed. Please open new ones, one for each independent improvement request.