https://bugs.kde.org/show_bug.cgi?id=441162

--- Comment #8 from Ancoron <ancoron.lucife...@gmail.com> ---
The actual issue here is that gwenview (or Qt) interprets the gamma value
incorrectly. ImageMagick (and other tools) set a default gamma of 2.2 for PNG's
and/or other file formats that support this metadata.

For the attached files, here's some metadata:

test.png:

Bit Depth                       : 8
Color Type                      : RGB with Alpha
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
Pixels Per Unit X               : 11811
Pixels Per Unit Y               : 11811
Pixel Units                     : meters
Image Size                      : 1800x2700


hires.png:

Bit Depth                       : 8
Color Type                      : RGB
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
Gamma                           : 2.2       <<< creating trouble for gwenview
White Point X                   : 0.3127
White Point Y                   : 0.329
Red X                           : 0.64
Red Y                           : 0.33
Green X                         : 0.3
Green Y                         : 0.6
Blue X                          : 0.15
Blue Y                          : 0.06
Background Color                : 255 255 255
Pixels Per Unit X               : 11811
Pixels Per Unit Y               : 11811
Pixel Units                     : meters
Modify Date                     : 2021:08:19 10:24:04
Warning                         : [minor] Text chunk(s) found after PNG IDAT
(may be ignored by some readers)
Datecreate                      : 2021-08-19T10:23:53+00:00
Datemodify                      : 2021-08-19T08:57:54+00:00
Image Size                      : 1800x2700


You can "fix" the PNG's for gwenview usually with: `convert <input> -set gamma
2.2 <output>`

...which actually sets the PNG gamma value to 0.4545, since it's the inverse
(and which is what gwenview should be doing).

However, that breaks the image for almost any other viewer/browser/editor that
interpret the gamma value, since they then are doing the color correction in
the inverse way with the inversed value.

Some background on why it is the way it is:
https://www.cambridgeincolour.com/tutorials/gamma-correction.htm

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to