Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,925
» Latest member: jjmeric
» Forum threads: 7,690
» Forum posts: 41,829

Full Statistics

Latest Threads
Gimp 3.0 get Metadata wit...
Forum: Extending the GIMP
Last Post: Volker
31 minutes ago
» Replies: 3
» Views: 85
Text Editor hardly ever w...
Forum: General questions
Last Post: Snacko
1 hour ago
» Replies: 4
» Views: 143
Colorized Layer Reverts t...
Forum: General questions
Last Post: TMORT
3 hours ago
» Replies: 4
» Views: 205
How to get G'MIC within G...
Forum: General questions
Last Post: rich2005
9 hours ago
» Replies: 2
» Views: 111
How to make image and mas...
Forum: Installation and usage
Last Post: Ofnuts
Yesterday, 08:39 PM
» Replies: 5
» Views: 248
Multi window mode mode fa...
Forum: General questions
Last Post: teapot
11-07-2025, 01:40 PM
» Replies: 5
» Views: 375
Animation with only GIMP ...
Forum: Gallery
Last Post: Scut-51
11-06-2025, 11:49 AM
» Replies: 25
» Views: 23,011
GIMP 3.04 opens with wind...
Forum: Windows
Last Post: subbareddy
11-05-2025, 07:47 AM
» Replies: 7
» Views: 3,802
Isolate, select and copy/...
Forum: General questions
Last Post: rich2005
11-04-2025, 04:39 PM
» Replies: 7
» Views: 513
"Plug-in crashed" on GIMP...
Forum: General questions
Last Post: skullamrotis
11-04-2025, 03:32 PM
» Replies: 4
» Views: 471

 
  Color Balance not working on a mask
Posted by: GMP - 05-24-2021, 04:51 PM - Forum: General questions - Replies (1)

I'm doing a face swap and like the idea of the non-destructive method using layer masks. I have a layer mask on the face and just use the paint tool to erase the part of the face pic I don't want.
When I try to use Color Balance or Brightness-Contrast it only seems to work around the edges of the face and not the whole face. How can I get it to work on the whole face?

Print this item

  What are color-indexed images (a.k.a. Why are my colors all wrong)?
Posted by: Ofnuts - 05-24-2021, 11:42 AM - Forum: Tutorials and tips - No Replies

You are likely reading this because Gimp is doing weird things with your image colors. This is usually caused by your image being color-indexed.
This can be checked by looking at the Gimp window title bar, that indicates the current image mode:

   

If this is the case, read on....

What are color-indexed images?

In most image formats, each pixel is described with three separate values for red, green, and blue. These values are usually kept in 8-bit bytes(*). A byte can hold 256 values, so the total number of possible colors (R, G, and B combinations) is 256×256×256=16777216 (≈16.8 million).

However, this can be quite wasteful if there are few colors. Enter color-indexed images. In such images, the (limited) set of colors is kept in a list, called the colormap. Colors in the list are described by the usual three bytes,  and pixels are described by a single number which is the index of their color in the list.

For instance you can have a colormap with just 8 colors such as this:

[0]     0,  0,  0   # Black
[1]   255,  0,  0   # Red
[2]     0,255,  0   # Green
[3]     0,  0,255   # Blue
[4]   255,255,  0   # Yellow
[5]     0,255,255   # Cyan
[6]   255,  0,255   # Purple
[7]   255,255,255   # White

and the yellow pixels in the image will be designated with the value 4.

A (small, 6×4 pixels ) French flag would for instance be represented by:

   3   3   7   7   1   1
   3   3   7   7   1   1
   3   3   7   7   1   1
   3   3   7   7   1   1


Colormaps are usually limited to 256 colors, because this allows the index to fit in a byte, so this makes the image use one third of the bytes needed for a full-color equivalent. With a bigger list, you would need at least two bytes and so would only get a 33% reduction in size, likely not worth the added complexity.

In regular images, the color map is very often close to 256 colors. Even if the image looks simple with areas of uniform colors, due to anti-aliasing the pixels on area boundaries are usually a blend of the colors on either side, so the color map of that blue and green image contains many intermediate colors:

   

In addition, if the image has transparent pixels, the transparent pixels are indicated by using a color in the colormap and flagging it as the "transparent" color (so the actual color map is restricted to 255 pixels, if you don't count transparency).

Color-indexed image formats

There are two common image formats that can be color-indexed:
  • PNG: A variant of the PNG format is color-indexed, even if this not a frequent usage for this format
  • GIF: GIF images are always color-indexed

GIMP handling of color indexed-images

In Gimp there are three image modes, RGB (3 color values per pixels), grayscale (one color value per pixel), and color-indexed. As shown above, with the default settings the image mode is displayed in the title bar of the image window. You can change the image mode with the Image ➤ Mode menus, which is also a way to check the current image mode.

Checking the color map

The colormap of the current image can be check using Windows ➤ Dockable dialogs ➤ Colormap. There is a single  colormap that applies to all the layers of the image(**).

Loading images

When the loaded image is in a color-indexed format, it is kept color-indexed in GIMP. So loaded GIFs are always color-indexed, while loaded PNGs can occasionally be so

Exporting images

If the image is color-indexed in GIMP, it is exported as a color-indexed file if the image format supports it (this is one way to create color-indexed PNGs). If the image is not color indexed and you export to a color-indexed format, the image is color-indexed on the fly.

Editing images

When you edit a color-indexed image, Gimp never changes the color map implicitly. This means that you cannot use colors in the image that are not already in the color map.

In particular:
  • All the colors of external images that you try to add to your color-indexed image will be adjusted the "closest color" in the color map, this includes:
    • Images that you load by File ➤ Open as layers
    • Anything that you paste (whatever the source: another Gimp image, or another application)
    • Layers that you drag from other open Gimp images
  • Most color tools (Levels, Curves, Brightness/Contrast, Saturation...) will behave strangely, because color values will "jump" between colors in the color map.
  • Many filters will be disabled.
  • Whatever the Foreground/Background colors are set to, the paint tools will use the nearest color in the color map.

In addition, since the handling of color-indexed image in Gimp is modeled on the GIF format, the opacity of layers is binary, everything is either fully opaque or fully transparent.

How can this be avoided?

The obvious solution is to convert the image back to full RGB (Image ➤ Mode ➤ RGB).

But this introduces new problems that you will have to deal with if you want a color-indexed format at the end (typically, a GIF animation).
  • In most cases you will have started with a colormap already full, and added new image/features that add even more colors, so your image contains more than 256 colors (you can check the current number of colors using Color ➤ Info ➤ Color cube analysis). When the image is color-indexed again, some of these colors will have to be coerced into one of the remaining 256 colors. This will very often make the image look grainy or pixellated. In the worst case, if you add features/images that are in stark contrast with the initial images, half the colors in the initial image will be binned to make room for the colors of the new features. The result won't be pretty.
  • If the additional colors are on new layers, you can sometimes mitigate this by doing the color-indexing outside of Gimp. Export all the frames as full-RGB PNGs, and use an external tool to make the animation from them. The tools will likely use a colormap per frame and so alleviate the single-colormap restriction.
  • If you use the dithering options other than Positioned, the dithering pattern is random, and identical areas on successive frames end up being dithered differently, and identical pixels are no longer encoded identically. Because of this you get a changing background and optimization doesn't work that well.
(*) which was a hard rule in Gimp up to Gimp 2.8. Gimp 2.10 lets you have more than 256 values per color channel when you use high precision images.

(**) an extension to the  GIF animation format allows one colormap per frame, but Gimp doesn't support it.

Print this item

  Can't hide layer boundary when merging layers
Posted by: GMP - 05-24-2021, 06:22 AM - Forum: General questions - Replies (4)

I have a simple project with just 2 layers. I want to merge them into 1 layer. But the layer boundaries aren't the same. IN the screen grab of GIMP you see 2 yellow layers. The top layer has a right border that doesn't extend to the right as far as the layer beneath it, which you can see it extending further to the right. When I export this image of 2 layers, the layer right and bottom boundaries show as you can see in the pic. I want to not see those 2 lines, when I export the pic. Is there any way to do this in GIMP?



Attached Files Image(s)
   
Print this item

  Icon 16 -> 32
Posted by: saitoib - 05-24-2021, 03:31 AM - Forum: General questions - Replies (2)

Hi all.

I want to enlarge an icon written in 16x16 to 32x32.
How can I do this?

Thank you

Print this item

  Fuzzy select antialiasing
Posted by: GimpUser1234 - 05-23-2021, 11:44 PM - Forum: General questions - Replies (16)

When I do a select using the ellipse tool and bucket fill the selection, I get anti-aliased edge. When I do a select using the Fuzzy select tool and then do a bucket fill, the edge is solid. I need anti-aliased edge. Is this possible using the the fuzzy tool?

Print this item

  unable to use clone after adding text
Posted by: picbyer* - 05-23-2021, 01:28 PM - Forum: General questions - Replies (6)

I just can't figure out why, after adding text to a doc, I can't go back and use the clone tool. I am trying to clean up a scanned document that has been photocopied too many times. It is a plot map of a cemetery and I am removing the dark background/numbers but leaving the lines of the individual plots. Then I go back and replace the hand written plot numbers with Text numbers. But when I go back to try to use clone to work on another row, I can't get it to use the selected clean portion to "erase" the dark pixels. I think it may be something to do with layers but I don't know how to use them. I've not found the correct tutorial for this yet. Hope someone can help without getting too technical.
Thank you



Attached Files Thumbnail(s)
   
Print this item

  font color issue
Posted by: liamrowan - 05-23-2021, 03:17 AM - Forum: General questions - Replies (1)

I am typing text into a text box but not seeing the words.  I see the cursor moving, but no text.  The background behind the text layer is ivory and the font color is showing as black in the font color window.  However, when I open the Text Editor, the text appears to be the same color as the ivory background layer, which would explain why I can't see it.  But since the color in the font window is black, I don't know what to do.  I changed the font color to colors other than black, but still can't see the text.  I tried to attach the xcf file but it appears to be too large, so I attached a screenshot to give an idea of what I'm seeing.  

Ideas?  Thx for assist!



Attached Files Thumbnail(s)
   
Print this item

  Opacity
Posted by: bcripps - 05-23-2021, 12:11 AM - Forum: General questions - Replies (11)

I open an image as a layer, create alpha channel then, when I slide the opacity to the left I get the checkerboard pattern instead of the image gaining less transparency. Can't remember having this problem before. I've fiddled with the settings and had a search around the forum but haven't found a solution.
Help would be much appreciated.
Thanks,
Bry

Print this item

  DUAL INSTALLING 2.8 & 2.10 ?
Posted by: StageMan - 05-22-2021, 04:03 PM - Forum: Windows - Replies (5)

Hello, 

I need some help/knowledge/info/instruction... call it what you will. 

But before I present my inquiry I feel I need to give you a little history on my experience so you'll be better able to help.

 I had 24 years in I.T. (retired). I've been into graphics on a frequent basis since 1995. I started with CorelDraw 3. When I got my own machine I started signing up as a Beta Tester for various companies. 
I got a Beta copy of Jasc Paint Shop Pro 4 (PSP Pro 4). Eventually I got Jasc PSP Pro 7 (2000), and that is what I've been using until last year when I got Corel Paint Shop Pro X6 (formerly Jasc), which I haven't really used much, and that's because there isn't many YouTube tutorials on it. I was told about Gimp. I've been learning Gimp for the last couple of weeks. 

Now for the issue that I'm posting about. As I stated... I had been an I.T. Professional since 1995. I've always been able to install 2 versions of the same Application on my machines to more easily migrate to the newer version. Why is it that I can't install Gimp 2.8 and Gimp 2.10 on the same machine? 

And please, do not reply if you are not using Gimp on Windows 10. 

Thank You for you time in reading my dilemma and replying with your experience and knowledge. 

Best Regards, StageMan

Print this item

  Trouble Creating New Fonts (- Brush)
Posted by: andyf - 05-21-2021, 07:09 PM - Forum: General questions - Replies (4)

This is my first time trying to create a custom crush and I can't seem to get this thing to export to my brushes folder no matter what I do.

It is in greyscale.

It is not transparent.

I flattened the image.

I am adding it to a folder that is selected in my font preferences.

I am trying to save it as a .gbr

Truly, I have no idea what I'm doing wrong. I've looked at about 100 posts and all of them list something I've tried as the solution. Clearly, I'm missing something but I have no idea what.

Thanks for any help.


Error Messages:



Execution error for procedure 'file-gbr-save-internal':

Error opening file “C:\Program Files\GIMP 2\share\gimp\2.0\brushes\heart.gbr”: Permission denied


Saving 'C:\Program Files\GIMP 2\share\gimp\2.0\brushes\heart.gbr' failed:

Running procedure 'file-gbr-save-internal' failed: Error opening file “C:\Program Files\GIMP 2\share\gimp\2.0\brushes\heart.gbr”: Permission denied



Attached Files Thumbnail(s)
   
Print this item