Posts: 11
Threads: 4
Joined: Aug 2021
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.8
11-22-2022, 10:57 PM
(This post was last modified: 11-22-2022, 11:07 PM by Drachenbauer.)
Hello
If i export an indexed (palette generated from graphic-colors) graphic with transperencies as png, there appear weird things at reimport:
After closing and reimporting there is always a random colored extra cell in the index-palette of the graphic.
And often all pure black (all rgb channels 0) pixels are turned into transparency.
I decided to report it here:
gimp bug-report
But this needs an account and i cannor receive the gonfirmation mail
Can someone report it for me there, please?
Posts: 6,350
Threads: 274
Joined: Oct 2016
Reputation:
565
Operating system(s):
Gimp version: 2.10
(11-22-2022, 10:57 PM)Drachenbauer Wrote: Hello
If i export an indexed (palette generated from graphic-colors) graphic with transperencies as png, there appear weird things at reimport:
After closing and reimporting there is always a random colored extra cell in the index-palette of the graphic.
And often all pure black (all rgb channels 0) pixels are turned into transparency.
I decided to report it here:
gimp bug-report
But this needs an account and i cannor receive the gonfirmation mail
Can someone report it for me there, please?
Probably not a bug. The color-indexed mode of Gimp is designed after the GIF standard, even if you export to PNG. So
- Pixels are either opaque or transparent, there is no partial alpha while color-indexed PNG supports it a
- There is an additional color in the palette that is flagged as the "transparent" color and all pixels that are encoded with the index of that color are assumed to be transparent. AFAIK this is inserted as the first color in the color map, with all RGB channels to 0, so it would be black if opaque.
So I assume that the additional color is the one added for transparency support.
Now, the question: PNG has been around for quite a while, but color-indexed PNG where exceedingly rare in the wild, and then over the last couple of weeks I have see plenty of question about them.... what started this? Is there a new game in town that uses this format for textures or else?
Posts: 7,134
Threads: 155
Joined: Oct 2016
Reputation:
1,005
Operating system(s):
Gimp version: 2.10
11-23-2022, 09:22 AM
(This post was last modified: 11-23-2022, 10:03 AM by rich2005.)
Already reported, almost the same: https://gitlab.gnome.org/GNOME/gimp/-/issues/7824
I remember this coming up before and it is a peculiarity of Gimp 2.10, not there in Gimp 2.8 An extra index0 added on import.
edit: A bit of experiment with IM identify.
Even with all the export options off, the extra color (index0) appears in a Gimp 2.8 png using IM. Just does not appear in the Gimp 2.8 colormap. How to explain that to the devs ?
Posts: 11
Threads: 4
Joined: Aug 2021
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.8
11-23-2022, 04:30 PM
(This post was last modified: 11-23-2022, 05:59 PM by Drachenbauer.)
(11-23-2022, 08:19 AM)Ofnuts Wrote: Probably not a bug. The color-indexed mode of Gimp is designed after the GIF standard, even if you export to PNG. So
- Pixels are either opaque or transparent, there is no partial alpha while color-indexed PNG supports it a
- There is an additional color in the palette that is flagged as the "transparent" color and all pixels that are encoded with the index of that color are assumed to be transparent. AFAIK this is inserted as the first color in the color map, with all RGB channels to 0, so it would be black if opaque.
So I assume that the additional color is the one added for transparency support.
to 1. i uns no semi transparencies in my actual graphics.
to 2. It looks like this extra color is somehow choosen somehow randomly and if it´s black, the black pixels in the graphic turn to transparent.
I noticed, even if gimp imports a graphic with black switched to transparent, another application shows the graphic correct.
So i think the issue must happen while importing it.
Why i use indexed png#s:
I like to have a specific set of colors in my pixelart, about 4-8 different precisely choosen colors.
if i now play around with a non indexed gimp, sometimes there appear extra colors, wich are slightly different to my wanted ones, wwat i can see on the index palette, if i activate this modus with the first option.
if i work with the indexed modus, i can prevent this from happening
Posts: 11
Threads: 4
Joined: Aug 2021
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.8
11-23-2022, 07:11 PM
(This post was last modified: 11-23-2022, 08:39 PM by Drachenbauer.)
ok, i think, it´s while exporting.
But this function should be improoved to never use a color for that extra cell, that is already included in the index-palette.
otherwhise it makes the color, it matches, alo transparent while importing (it seems to have no effect on other applications like coding environments that use png´s as sprites, there the graphics look alright even in this case.)
How can i make gimp display the picture correct if this bad case happened?
Posts: 11
Threads: 4
Joined: Aug 2021
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.8
there really should be an algorithm before adding that new color.
at first it should check, if there is a color, that already used for only transparent pixels.
If yes, all transparent pixels should be converted to belong to this palette-color, that is also moved to the front, if not already there.
Only if it does not find such a color, it should add a new color and it should always make sure, that the color does not already exist in the palette.
Posts: 7,134
Threads: 155
Joined: Oct 2016
Reputation:
1,005
Operating system(s):
Gimp version: 2.10
11-26-2022, 08:27 AM
(This post was last modified: 11-26-2022, 08:28 AM by rich2005.)
No Gimp developers come to this site.
The bug is in the milestone list Unstarted Issues (open and unassigned)
https://gitlab.gnome.org/GNOME/gimp/-/mi...tab-issues
Exporting an indexed PNG image with transparent pixels adds color to colormap
#7824 1. Bug 2.10.30 2.99 5. Plugins Plugins: png
Maybe you should bring this issue up again, for a fix with Gimp 2.10.34 (as shown in the earlier bug report)
Since you can't get on gitlab, try reddit where Schumacher hangs out.
Posts: 11
Threads: 4
Joined: Aug 2021
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.8
(11-26-2022, 08:27 AM)rich2005 Wrote: No Gimp developers come to this site.
The bug is in the milestone list Unstarted Issues (open and unassigned)
https://gitlab.gnome.org/GNOME/gimp/-/mi...tab-issues
Exporting an indexed PNG image with transparent pixels adds color to colormap
#7824 1. Bug 2.10.30 2.99 5. Plugins Plugins: png
Maybe you should bring this issue up again, for a fix with Gimp 2.10.34 (as shown in the earlier bug report)
Since you can't get on gitlab, try reddit where Schumacher hangs out.
I´m not here to find developers, i´m here to find someone, who van successfolly create an account there to pring the issue up for me.
It seems like the page is unable to send registration confirmation mails to freenet or gmail adresses.
So i cannot do it my self.
Posts: 7,134
Threads: 155
Joined: Oct 2016
Reputation:
1,005
Operating system(s):
Gimp version: 2.10
12-04-2022, 06:15 PM
(This post was last modified: 12-04-2022, 06:16 PM by rich2005.)
There you are: https://gitlab.gnome.org/GNOME/gimp/-/issues/8931
I had to say you are using Gimp 2.10.32 otherwise the devs just ask to update.
|