RSS/Atom feed Twitter
Site is read-only, email is disabled

Converting from indexed to RGB modes; brush color off

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Converting from indexed to RGB modes; brush color off Maxomega 21 Dec 03:37
  Converting from indexed to RGB modes; brush color off Gary Aitken 22 Dec 22:42
   Converting from indexed to RGB modes; brush color off Øyvind Kolås 23 Dec 14:46
    Converting from indexed to RGB modes; brush color off Gary Aitken 24 Dec 02:22
2019-12-21 03:37:31 UTC (over 4 years ago)
postings
2

Converting from indexed to RGB modes; brush color off

So I was editing a sprite sheet for a video game character, and after working with it for a bit, I noticed the color I was using was off from the brush color. Later, I noticed the layers were behaving strange, and that it probably had something to do with being in indexed mode.

I changed the image to RGB mode, but my brush color is still off, and layering multiple brush colors combines the colors for some reason. My brushes are at 100 hardness and 100% opacity, so I don't know what the issue could be. I'm just trying to paint over all the color in the image to be 00FF00, or the greenest green.

First attached is a screenshot of the base image, unpainted. Also included is the brush color, which already doesn't match the outside. Note that the top layer is the active one.

Second attached is what happens when I try to draw over the image with a plain green brush. The black rectangle is the boundary of the middle layer, but I'm not sure why it's black at all.

Third attached is what happens when I try to do same thing (painting with the green brush), but with the second layer active.

I'm just really confused. I don't know much about GIMP, but I've been using it for well over 5 years and I've never come across something like this.

Attachments: * https://www.gimpusers.com/system/attachments/1316/original/Capture.PNG * https://www.gimpusers.com/system/attachments/1317/original/Capture2.PNG * https://www.gimpusers.com/system/attachments/1318/original/Capture3.PNG

Maxomega (via www.gimpusers.com/forums)
Gary Aitken
2019-12-22 22:42:53 UTC (over 4 years ago)

Converting from indexed to RGB modes; brush color off

On 12/20/19 8:37 PM, Maxomega wrote:

So I was editing a sprite sheet for a video game character, and after working with it for a bit, I noticed the color I was using was off from the brush color. Later, I noticed the layers were behaving strange, and that it probably had something to do with being in indexed mode.

I changed the image to RGB mode, but my brush color is still off, and layering multiple brush colors combines the colors for some reason. My brushes are at 100 hardness and 100% opacity, so I don't know what the issue could be. I'm just trying to paint over all the color in the image to be 00FF00, or the greenest green.

First attached is a screenshot of the base image, unpainted. Also included is the brush color, which already doesn't match the outside. Note that the top layer is the active one.

Second attached is what happens when I try to draw over the image with a plain green brush. The black rectangle is the boundary of the middle layer, but I'm not sure why it's black at all.

Third attached is what happens when I try to do same thing (painting with the green brush), but with the second layer active.

I'm just really confused. I don't know much about GIMP, but I've been using it for well over 5 years and I've never come across something like this.

Attachments: *
https://www.gimpusers.com/system/attachments/1316/original/Capture.PNG

* https://www.gimpusers.com/system/attachments/1317/original/Capture2.PNG

*
https://www.gimpusers.com/system/attachments/1318/original/Capture3.PNG

I don't know much about this, but doing some fiddling around I've discovered the following:

If the original indexed colormap does not contain the color you desire, painting will paint black:

1. create an 8 bit integer color image, transparent background change the image color mode to indexed change the paint foreground color to full green painting in the image will paint black

2. create an 8 bit integer color image, transparent background change the paint foreground color to full green paint in the image => paints green change the image color mode to indexed paint in the image => paints green

I don't know if this is intentional or not; I would have thought that if the original color index map is not full, using a new color would add it to the map, but apparently not.

By default, when you choose convert to indexed mode, the colormap chosen is "Generate optimum palette" with a maximum number of colors of 255. The "Remove unused and duplicate colors from colormap" option is checked. You cannot uncheck it. To uncheck it, switch to custom palette mode, uncheck it, and then switch back to generate an optimum palette. Unfortunately, doing this has no affect; the generated palette still contains only the existing colors, and no holes for additional colors.

I would suggest you create a new colormap with only the colors you wish to use in your images:
Windows/Dockable Dialogues/Palettes

I would suggest reading the following sections of the 2.10 user manual: 2.4 Colormap Dialog
12.1 Palettes/Colormap
3.5 Palettes Dialog (esp. the Note)

Gary

Øyvind Kolås
2019-12-23 14:46:20 UTC (over 4 years ago)

Converting from indexed to RGB modes; brush color off

On Sun, Dec 22, 2019 at 11:42 PM Gary Aitken wrote:

I don't know if this is intentional or not; I would have thought that if the original color index map is not full, using a new color would add it to the map, but apparently not.

What you are suggesting; to add the directly chosen color of the paintbrush/pencil tool, if there is empty slots in the palette would not conflict with this and be a nice addition - filing an issue against GIMP in gitlab.gnome.org to keep it from being forgotten might be a good idea. It would have to be only the directly selected foreground color though and not its antialiased results with various background pixels which would be ohter colors implicity attempted to be inserted. Since the more complete port to babl/GEGL with 2.10 GIMP is no longer special casing INDEXED/GRAYSCALE mode from RGB. This meant as new features we gained anti-aliasing for the paintbrush in indexed mode, ability to blur and do other filters; as well as anti-aliased results when merging down layers/text-layers - this would quickly exhaust the free slots in the palette if all attempted to be used colors were added (checking if the current foreground color is part of the palette before starting a new stroke is also a more feasible code change than always dynamically growin the palette).

/pippin

Gary Aitken
2019-12-24 02:22:55 UTC (over 4 years ago)

Converting from indexed to RGB modes; brush color off

On 12/23/19 7:46 AM, Øyvind Kolås wrote:

On Sun, Dec 22, 2019 at 11:42 PM Gary Aitken wrote:

I don't know if this is intentional or not; I would have thought that if the original color index map is not full, using a new color would add it to the map, but apparently not.

What you are suggesting; to add the directly chosen color of the paintbrush/pencil tool, if there is empty slots in the palette would not conflict with this and be a nice addition - filing an issue against GIMP in gitlab.gnome.org to keep it from being forgotten might be a good idea. It would have to be only the directly selected foreground color though and not its antialiased results with various background pixels which would be ohter colors implicity attempted to be inserted. Since the more complete port to babl/GEGL with 2.10 GIMP is no longer special casing INDEXED/GRAYSCALE mode from RGB. This meant as new features we gained anti-aliasing for the paintbrush in indexed mode, ability to blur and do other filters; as well as anti-aliased results when merging down layers/text-layers - this would quickly exhaust the free slots in the palette if all attempted to be used colors were added (checking if the current foreground color is part of the palette before starting a new stroke is also a more feasible code change than always dynamically growin the palette).

/pippin

Done, issue #4400