1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adjusting an overall image color?

Discussion in 'General GIMP help' started by Whirler, Dec 28, 2012.

  1. Whirler

    Whirler Member

    Joined:
    Dec 28, 2012
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Please excuse me for not knowing the correct terminology here, but I am looking for a way to use GIMP to adjust the overall coloring of a satellite land image. I'm making custom photo-realistic scenery for MS Flight Simulator X, and am running into inconsistent color of adjoining imagery gathered from satellite servers. Attached is an example of what I have to deal with and would like to fix. In the real world this area would all be colored more like that on the right. The satellite image somehow added the red tint.

    I'd like to make the 'red part' look more like the (correct coloring in the) green part. Since there are so many tiny blocks of different shades of color (farm fields, etc.) I don't know of any way to do this short of selecting and playing with the color of each field, and obviously that isn't something I want to think about. :) I have tried selecting and editing the red part, but when I try to make the image more green it causes some of the greens in this reddened area to 'blow out' and be way to over-saturated and sometimes look like dayglo. :) Is there perhaps some sort of filter I could overlay that might cut down on the redness?
     

    Attached Files:

  2. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,201
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    Germany
    There's some basic things you can do, and I'll tell you the two easiest ones (although it doesn't look as good as the long ones):
    First, just open the image up in Gimp, and go to Colors > Color Balance. Something similar to this should pop up: [​IMG]
    Play with the different settings (they're pretty much self-explanatory) until you have your desired outcome, and then hit okay.

    Second way: Open it up with Gimp, duplicate your layer (Rightclick in the layers dialog and choose "Duplicate Layer"), and then click on the top one (the new copy). Now go to Colors > Colorize and choose a light green color on the window that pops up. Your image should now look rather horrible and way too green. But if you now go to the layers dialog again and choose another layer mode (for example "Overlay") in the dropdown menu, as well as tone down the opacity of the top layer, you should get a rather convincing result.


    If these don't work or if you have any questions, don't hesitate to ask them here.
     
  3. Shyftcode

    Shyftcode Member

    Joined:
    Oct 19, 2012
    Messages:
    352
    Likes Received:
    0
    Trophy Points:
    16
    Occupation:
    Attempted graphic designing occupation.
    Location:
    Wherever, ya know...
    Home Page:
    I was gonna suggest the colorize way, but that's because I rarely use the Color Balance :p
     
  4. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,201
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    Germany
    Me too, but it's actually quite good if you look at the small amount of effort it takes to use it.
     
  5. Whirler

    Whirler Member

    Joined:
    Dec 28, 2012
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Thanks, guys! These methods do help quite a bit. :)
     
  6. Whirler

    Whirler Member

    Joined:
    Dec 28, 2012
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Here's an example of how your colorizing suggestion is helping things look better.
     

    Attached Files:

  7. Whirler

    Whirler Member

    Joined:
    Dec 28, 2012
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
  8. Shyftcode

    Shyftcode Member

    Joined:
    Oct 19, 2012
    Messages:
    352
    Likes Received:
    0
    Trophy Points:
    16
    Occupation:
    Attempted graphic designing occupation.
    Location:
    Wherever, ya know...
    Home Page:
    You can go to a site like tinypic.com or imgur.com and upload them externally. Copy the location of the image you want and enclose the link is the [img^][/img^] tags (minus the ^)

    For instance:
    Code:
    [img]http://i.imgur.com/lqn32.png[/img]
    Will display like this:
    [​IMG]


    (You can copy the location of the image by right clicking it and hitting "Copy Image Location" Then just paste it from your clipboard.
     
  9. Whirler

    Whirler Member

    Joined:
    Dec 28, 2012
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    OK, thanks on the image posting pointers. :) I understand the server overhead would grow huge to host a lot of pictures, but it almost seems silly to allow them, then restrict them to 100 square pixels.

    While I am playing with correcting the red imagery, I happened to 'discover' the fuzzy selection tool, which turns out to be a perfect way to select the undesirable colorations on most rivers in these images, and makes it easy to fill them in with a more realistic color for the river water. :)

    With the help of all the nifty GIMP features, this whole project for me is rather like the fable about Stone Soup. I keep finding more "ingredients" to make things in my project look better and better. :)
     
  10. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,201
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    Germany
    We had a really big change going on to this website in the past weeks. The owner changed, the whole design of the site and it's structure changed, and there are still some things that have to be figured out. For now, imgur.com has a really good service, better than anything we could offer. I should maybe make an announcement thread where questions like these get answered ;)

    About the fuzzy selection tool: There are some occasions when the fuzzy selection will give really bad results. I'd suggest a way that I like to use when I make color corrections:
    - Open your image up in Gimp
    - Duplicate the base layer right from the start
    (- Right-click on the new layer and choose "Add Alpha Channel", this will give you the opportunity to make a part of the image transparent. Some images already have an alpha channel in the first place, so this option may already be whited out)
    - Change everything you want for a specific part of your image (for example, adjust the colors in a way that the river is fixed, even if the land now looks completely weird)
    - Select the eraser tool and a big, fuzzy brush
    - Start erasing every part of the image that is not the river
    -> You now have a fixed river while every other part of the image stayed the same

    I know this may take a little longer, but trust me, there's limitations to the fuzzy selection tool, and if you find them, your images will look pretty bad ;)
    As long as the fuzzy selection tool does it's job though, you can of course continue to use it. There's probably dozens of ways to accomplish recoloring in Gimp.
     
  11. ofnuts

    ofnuts Member

    Joined:
    Dec 30, 2012
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Two methods I have not seen mentioned above:

    1) Colors/Map/Rotate colors: it's easy to select only the blues and change them to anything

    2) Add an alpha channel, and Colors/Colors to alpha, using the unwanted color as a reference. This makes it transparent (and makes "close colors" partially transparent). Add a new layer below the satellite image layer, and fill with required color.
     
  12. Whirler

    Whirler Member

    Joined:
    Dec 28, 2012
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Two very interesting posts! I'll look into both of them. Thanks!

    Here is where I can verify something I was told, that being BMP files cannot handle alpha channel data. It seemed to be true when we were hammering out how to apply a gradient to the edge of lakes in the scenery, by adjusting a masking layer which FSX's compiler calls a Blendmask. It is a layer which is drawn in a %age of pure black overlaying the base image. It works in tandem with a pure black Watermask layer, which tells FSX where to render its water effects. Any areas inside the Watermask, but NOT inside the Blendmask, get rendered as partially transparent, allowing any coloring applied to the base image, under where the water will render, to partially show through. With the right shades of blue-green under it, this area takes on the aqua coloration of shallower water, once the base layer and both mask layers are compiled into what FSX calls a BGL file. It works great, but you still get a sharp edge where the transformation occurs. So we found a way to feather the transformation, by applying a gradient to the edge of the Blendmask layer. The realistic look is very much improved by this.

    Every time we got the gradient on the Blendmask layer edge, and then GIMP exported the layer as a BMP (required by the FSX "resample.exe" compiler) it lost the gradient and kept the original hard edge. So the only way to preserve the gradient edge is to export the Blendmask.bmp file, then reopen it with GIMP (it is now just a black and white single layer image) and do the gradient with the airbrush tool, then export it a second time. My son, who was helping me and has Photoshop experience, told me bitmaps don't preserve Alpha Channel information, so that is probably why we had to use this procedure. Is he correct?
     
  13. ofnuts

    ofnuts Member

    Joined:
    Dec 30, 2012
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    There are BMP variants that support alpha-channel. It all depends which one you use. But it seems that there is not much software supporting this properly... From quick tests I just did, Gimp and ImageMagick have exactly opposite views on the encoding of the opacity: what is opaque for one is tranparent for the other... (other software just ignores the transparency).
     
  14. Whirler

    Whirler Member

    Joined:
    Dec 28, 2012
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Ok. Thanks for the heads up. Due to the experience I detailed above, the bottom line for me appears that I can't rely on Alpha Channel data in this project. :) don't you just love "standards". LOL :))
     
  15. Whirler

    Whirler Member

    Joined:
    Dec 28, 2012
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Selecting (and unselecting) multiple areas

    I learned I can select multiple areas of, say, rivers when using the Fuzzy Select tool (I did encounter some of its bad effects, btw) by holding down SHIFT. But I can't figure out how to UN-select an area that I click on by mistake, while still preserving the previously added selections. I have to cancel all the selections and start all over again. Is there a key to hold that will let me remove the last added selection but keep all the previously added selections in the group?

    Oops. I accidentally clicked when using CTRL and the mouse wheel to zoom, and it appears holding CTRL and clicking does exactly that, removing the last added selection. :)
     
  16. ofnuts

    ofnuts Member

    Joined:
    Dec 30, 2012
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Edit/Undo (Ctrl-Z) removes the last added selection...
     
  17. ofnuts

    ofnuts Member

    Joined:
    Dec 30, 2012
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Re: Selecting (and unselecting) multiple areas

    This will remove it if you click exactly on the same spot (otherwise you remove from the selection whatever matches the pixels on which you Ctrl-clicked). But "Edit/Undo" or Ctrl-Z will remove the last added selection.
     
  18. Whirler

    Whirler Member

    Joined:
    Dec 28, 2012
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    OK, thanks! I've started coloring the rivers on their own layer, once selected from a duplicate of the base image layer and then clearing away everything not selected as river water. As warned above, sometimes the Fuzzy Select tool does wander out into an undesirable area, because the base layer coloration of the river water is not purely one color. If I happen to click on one of the color variations in the water, and it finds anything else adjacent which is that color too, it selects all of it. But I have found that it is easy to correct such issues once I apply the color to the selected "water" because, with the terrain cleared, the errant selections stand out against the white background, before I turn that into transparent Alpha areas. I can simply erase them away. Then do the Layers/Transparent/Color to Alpha step to produce a layer with just the river water, harbors, etc. in it. I then place that layer at the top, with the green coloration layer under it, and the base image on the bottom.

    Being able to work with multiple layers and transparencies is very cool! I save the layered file as an .xcf GIMP file, and if I decide I want to change something after I've compiled the bitmaps into FSX and seen how it looks, I can come back to the xcf and edit a single layer rather than having to start all over again. :) The only minor caveat is that one needs tons of storage space for this kind of project. One exported bitmap of this layered file can easily be hundreds of MB, and it is just for a few counties in one state. With all its other files for this small area of lakeshore I have 2GB stored. But once I get the colors right I can offload the constituent files somewhere and just keep the final compilation (BGL file) on the PC.
     
  19. Whirler

    Whirler Member

    Joined:
    Dec 28, 2012
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Selecting every color EXCEPT white?

    If you have an image with a spattering of color comprised of multiple shades of different colors against a white background, is there a way to select every color EXCEPT white?

    This would come in handy for cleaning up a river/lowland area which, when selected using the Fuzzy Select tool, 'leaks' out of the desired path of selection for the river itself. Once I have such a selection, invert selection, and clear the surrounding terrain, I have a white background with all the previously selected river colors in pixels, usually of multiple shades, surrounding the main body of the river. I can selectively erase the unwanted areas to fix the runaway spread of the Fuzzy Selection when that occurs. BUT..... if I happen to Select None and start doing the erasing (past my currently set 12 levels of undo) and then realize I never painted the correct color on the entire selection FIRST, I now have no easy way to re-select all those pixels with all their various shadings (that I know of). I made this mistake and had to start over with the river layer in the current segment. Knowing of a way to select all colors not white would have saved me some rework. :)
     
  20. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,201
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    Germany
    Either select the white BG with the magic wand tool and "Select > Invert"
    Or duplicate layer, go Colors > Color to Alpha > White, then right-click in the layers dialog and choose "Alpha to selection" and invert selection again (this gives worse results though, as it also takes away the white parts of the other colors (a light green will become almost invisible after taking out all the white).
    There are probably some more ways, but my battery is at 4% now and I have to rush this message :D Good luck
     

Share This Page