Gimp Alpha different from PNG Alpha? - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Gimp Alpha different from PNG Alpha? (/Thread-Gimp-Alpha-different-from-PNG-Alpha) |
Gimp Alpha different from PNG Alpha? - Alibasher - 06-30-2020 GIMP transparency seems to behave differently from transparency after being exported to a png file. If you take a look at the attachment. When creating a circle shaped white gradient, and creating a background layer with the left half being grey and the right half being fully transparent. Then export to a png file and display in front of the same grey background, you get a different result. Is there a colour option or setting that can be changed to "fix" this behaviour? I have also tried in Paint.net and it behaves the same as png alpha. RE: Gimp Alpha different from PNG Alpha? - Kevin - 06-30-2020 You've left too much unexplained. When you say "display in front of the same grey background" How are you displaying this? When you create the "white gradient", what settings are you using "FG to Transparent"? What "Blend Color Space" ? What image mode, precision, color management? Can you attach an example of the image you have exported please. RE: Gimp Alpha different from PNG Alpha? - Krikor - 06-30-2020 If you have a semi-transparent white image on a gray background, it seems to me that the gray background would be expected to be visualized with its tone altered by the low opacity of the white color. Anyway, I tried to reproduce what I understood was done, but my result was not the same. [attachment=4604] RE: Gimp Alpha different from PNG Alpha? - Alibasher - 06-30-2020 Quote:When you say "display in front of the same grey background" How are you displaying this?After exporting the image to a png file, inserting the image above a background of the same grey. It happens on webpages, Office software, etc. Quote:When you create the "white gradient", what settings are you using "FG to Transparent"? What "Blend Color Space" ?I don't believe the type of gradient should matter, as this is happens to any translucent pixels. The "Blend Space" is set to auto. Not sure if "Blend Color Space" is different? Quote:What image mode, precision, color management? Image mode is RGB. Precision is 8 bit integer, perceptual gamma. Colour management is enabled. Quote:Can you attach an example of the image you have exported please.Sure, I have attached the example image. I have also added a screenshot of the image being viewed in a browser and Powerpoint and in GIMP on top of the grey background in each. RE: Gimp Alpha different from PNG Alpha? - Kevin - 06-30-2020 And if I set the GIMP layer mode to Normal Legacy: [attachment=4607] Which is what happens when you try to display it with something that assumes gamma-corrected images. I think you need to be careful about layer modes and the gradient blend-mode to avoid linear light calculations. RE: Gimp Alpha different from PNG Alpha? - Alibasher - 06-30-2020 Oh, that fixes it. So to view the image properly in GIMP, you set the layer mode to legacy: [attachment=4609] And to fix the translucent layer you set the layer's composite space to RGB (perceptual) by right clicking the layer. [attachment=4608] Problem solved, thanks RE: Gimp Alpha different from PNG Alpha? - Krikor - 06-30-2020 I could never imagine that choosing between Legacy and Default modes could cause such a disturbance. But following Kelvin's explanation, I got different results for the image edited in Legacy mode (top) and Default mode (bottom). Thanks Kelvin, for the solution! RE: Gimp Alpha different from PNG Alpha? - rich2005 - 07-01-2020 Anyone know why Gimp 2.10 switched to pre-multiplied alpha png defaults I have an old utility that takes a png (as produced by Gimp 2.8) and outputs a pre-multiplied version. I have had a look around & never seen anything that goes the other way (except maybe a Mac utility). I suppose that conversion was never needed. Edit: Ok have re-read the wikipedia entry yet again and think I understand the reasons. |