Post Reply 

Change brightness/contrast for part of image

Oct 27, 2012, 17:56
Post: #1
Change brightness/contrast for part of image
I am able to change the brightness/contrast for part of an image by using, for example, the Rectangle Select tool. I want to be a little trickier though. I would like to use the rectangle select tool, but have the effect of the brightness/contrast apply 100% at the bottom of the rectangle and say 10% at the top, with gradations from 100 to 10 from bottom to top. Is this possible?
Find all posts by this user
Quote this message in a reply
Oct 27, 2012, 20:51
Post: #2
RE: Change brightness/contrast for part of image
There are basically two ways to achieve this:

Method 1: create a selection with a gradient:
  • Create the rectangle selection on your layer
  • Open the Channels list (Windows/Dockable dialogs/Channels)
  • Click the "New channel" icon at bottom, and initialize to 100% opacity
  • Your canvas fills with black, with the "marching ants" still marking your selection
  • Fill the selection with a black to white gradient (white is replaced by transparency, so the parts of the image that appear are those that will be selected in the end, in proportion to their visibility)
  • Right-click the channel, and "Channel to selection"
  • Click the visibility icon of your channel (makes is invisible, so you should now see you full image)
  • The selection looks too small (half the height): this is normal, the ants are really traveling the 50% selection line so they only show the part where pixels are more than 50% selected.
  • In the Layers list, select your Layer (if you omit this, you'll be editing you channel)
  • Play with Brightness/Contrast

Method 2: :create another layer with the full effect applied, and blend the layers with a layer mask that contains a gradient:
  • Duplicate the layer
  • Apply brighness/contrast to active layer (the top one)
  • "Layer/Transparency/Add layer mask", initialize to black (foreground color)(you see the bottom layer, because this makes the top layer completely transparent)
  • Create rectangle selection over area
  • Create a white-to-black blend in selection (black will be the bottom image, white will be the top image)
  • You can use "Levels" or "Curves" on the layer mask to adjust how/where the blend is made
  • "Layer/Mask/apply layer mask" when done
  • You can also do things in a different order: duplicate layer, create the layer mask first, and apply the Color/Brightness to the top layer, This gives you more live feedback on the brightness/contrast step (like in Method 1), but you have less feedback to shape the gradient (you can't adjust both layer and layer mask at the same time).

Look more complicated than it really is, even if method 1 is a really nice exercise in channel handling (hey, I also learned stuff answering this).

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Oct 28, 2012, 15:21 (This post was last modified: Oct 28, 2012 15:21 by allelopath.)
Post: #3
RE: Change brightness/contrast for part of image
Thanks for your monster reply.

I was following Method 1 and I screwed something up. The b&w gradients had looked as you would expect (black -> white) but now they are all white.
   
How can I get these back to normal?

GIMP 2.8.0
OS X
Find all posts by this user
Quote this message in a reply
Oct 28, 2012, 15:59 (This post was last modified: Oct 28, 2012 16:11 by ofnuts.)
Post: #4
RE: Change brightness/contrast for part of image
These aren't Black to White gradients, but Foreground-to-Background (so they track the change of these colors), and you have changed your background color to white.

PS: normally there is no need to edit any gradient in my method, there is a FG-to-BG gradient by default in Gimp, so if you have the usual Blnakc and Whiite as FG/BG... However, if you often play with masks, it is useful to have your own 'true' Black-o-White gradient (as opposed to FG-to-BG) so that you can produce that gradient without changing your colors.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  "Open Image" change default folder and thumbnail view? Dave001 1 58 Aug 15, 2017 19:56
Last Post: ofnuts
  How to wrap paragraph text in an image arun67 0 45 Aug 12, 2017 12:46
Last Post: arun67
  Change the space between lines of text ead 1 66 Jul 28, 2017 12:38
Last Post: ythgilb
  Combining gif image to static image help? littlegreendog 1 76 Jul 26, 2017 12:27
Last Post: ythgilb
  Image color vs color picker YalithKBK 1 118 Jul 7, 2017 11:45
Last Post: ythgilb

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS