Someone posted it to their bug tracker forever ago, with images, but they changed the name to some random unrelated feature request and now I can’t find it. Did find this Bluesky post about it, though:
!memes@lemmy.world Oh… Thanks, now I see it. I just did a quick test (comparison screenshots embedded in this reply), trying to imitate as much as possible from that Bluesky post (RGB 8-bit gamma integer, sRGB, background layer was deleted, an image with a smaller size was pasted to the canvas, a manual mask was added to the pasted layer) and, yeah, I was able to reproduce this problem here: if the alpha value is low enough, it either ends up truncating to zero, otherwise it gets reduced to a lower value; higher values are seemingly unaffected. The problem also happens with other transparency-able formats such as WEBP.
However… based on what I barely know about image file formats and color theory, I’d say it seems something to do with the color profile, as color profiles are responsible for gamma adjustment (and this ends up including the alpha channel as well). The very name of the GIMP’s native color profile says it all: “Perceptual” sRGB, this means it’s adjusting the values to account for human perception, akin to how audio files (MP3, to be exact) truncate everything below somewhere around 60Hz and above somewhere around 15 kHz (the frequency range for average humans). Even though PNG is meant to be lossless, a color profile is inherently a lossy thing, because human perception is a lossy thing, which certain color profiles try to imitate, especially “Perceptual” ones.
I didn’t test the same GIMP behavior with other color profiles, though.
To be clear: I’m not talking about the “Export color profile” option one can choose during exporting, I’m talking about the color profile used when a new image is created and edited in GIMP. Really, this “color profile” thing is very important to a picture (esp. photographs) yet it’s so complicated that even image editing software developers are likely to struggle with it…
Not to mention how it is kinda related to hardware too, despite the dismissal from Paynamia; to be exact, it has to do with the graphics peripheral, the LCD/LED/etc monitor/TV, as every monitor/TV can and will have different manners to display images; the color profile mainly tries to compensate for an expected monitor (which, in turn, tries to compensate for human perception), but it’ll compute new values for the pixels to be saved in the file so the final picture matches the color profile but will likely lose the original precision.
I wonder how I never noticed this, even though I deal with transparent PNGs a lot, maybe I didn’t have to use very low alpha values before.
As for the screenshot below, a triangular chunk of green background next to her (Lesser Horned Owl, Macaulay Library ML379762121) ear-tufts is missing from the PNG. Funny thing I used GIMP to do this side-by-side comparison regarding the GIMP’s problem, lol.
(I’m aware I’m doing a deeply-technical reply in a meme community but I can’t help myself but to be nerdy and verbose)
To be fair, I didn’t notice it and start digging looking up information about it until I was working on a mod for Half-Life (usually my profile pic, but I think I don’t have it here), and needed to be able to create an extremely specific alpha channel for the phong mask.
Iirc, I experimented with the color profile settings and got no difference. I will say that I can’t seem to reproduce what I was saying about the banding now. For a short while after 3’s release, I was getting major banding in the alpha channel, but now I’m not.
Someone posted it to their bug tracker forever ago, with images, but they changed the name to some random unrelated feature request and now I can’t find it. Did find this Bluesky post about it, though:
https://bsky.app/profile/paynamia.bsky.social/post/3kt6odnfbcc2i
!memes@lemmy.world Oh… Thanks, now I see it. I just did a quick test (comparison screenshots embedded in this reply), trying to imitate as much as possible from that Bluesky post (RGB 8-bit gamma integer, sRGB, background layer was deleted, an image with a smaller size was pasted to the canvas, a manual mask was added to the pasted layer) and, yeah, I was able to reproduce this problem here: if the alpha value is low enough, it either ends up truncating to zero, otherwise it gets reduced to a lower value; higher values are seemingly unaffected. The problem also happens with other transparency-able formats such as WEBP.
However… based on what I barely know about image file formats and color theory, I’d say it seems something to do with the color profile, as color profiles are responsible for gamma adjustment (and this ends up including the alpha channel as well). The very name of the GIMP’s native color profile says it all: “Perceptual” sRGB, this means it’s adjusting the values to account for human perception, akin to how audio files (MP3, to be exact) truncate everything below somewhere around 60Hz and above somewhere around 15 kHz (the frequency range for average humans). Even though PNG is meant to be lossless, a color profile is inherently a lossy thing, because human perception is a lossy thing, which certain color profiles try to imitate, especially “Perceptual” ones.
I didn’t test the same GIMP behavior with other color profiles, though.
To be clear: I’m not talking about the “Export color profile” option one can choose during exporting, I’m talking about the color profile used when a new image is created and edited in GIMP. Really, this “color profile” thing is very important to a picture (esp. photographs) yet it’s so complicated that even image editing software developers are likely to struggle with it…
Not to mention how it is kinda related to hardware too, despite the dismissal from Paynamia; to be exact, it has to do with the graphics peripheral, the LCD/LED/etc monitor/TV, as every monitor/TV can and will have different manners to display images; the color profile mainly tries to compensate for an expected monitor (which, in turn, tries to compensate for human perception), but it’ll compute new values for the pixels to be saved in the file so the final picture matches the color profile but will likely lose the original precision.
I wonder how I never noticed this, even though I deal with transparent PNGs a lot, maybe I didn’t have to use very low alpha values before.
As for the screenshot below, a triangular chunk of green background next to her (Lesser Horned Owl, Macaulay Library ML379762121) ear-tufts is missing from the PNG. Funny thing I used GIMP to do this side-by-side comparison regarding the GIMP’s problem, lol.
(I’m aware I’m doing a deeply-technical reply in a meme community but I can’t help myself but to be nerdy and verbose)
To be fair, I didn’t notice it and start digging looking up information about it until I was working on a mod for Half-Life (usually my profile pic, but I think I don’t have it here), and needed to be able to create an extremely specific alpha channel for the phong mask.
Iirc, I experimented with the color profile settings and got no difference. I will say that I can’t seem to reproduce what I was saying about the banding now. For a short while after 3’s release, I was getting major banding in the alpha channel, but now I’m not.