GNOME Bugzilla – Bug 757783
When opening linear gamma pngs or tiffs, many operations give wrong results
Last modified: 2015-11-23 21:31:26 UTC
When opening a true linear gamma sRGB png or tiff (and any other file format that GIMP doesn't assume should be linear), all editing operations that request RGB/A or Y/A produce wrong results. This is because all such operations request that the RGB data be "linearized" from an assumed sRGB TRC. "Linearizing" already linear RGB produces approximately gamma=0.45-encoded RGB. See https://mail.gnome.org/archives/gimp-developer-list/2015-November/msg00003.html for details.
Please attach such a (small) true linear PNG and TIFF here, so we can at least make sure it's loaded into the correct GEGL buffers.
Created attachment 315093 [details] linear gamma sRGB 16-bit integer png
Created attachment 315094 [details] 32-bit floating point tiff
Created attachment 315095 [details] linear gamma sRGB red and green blocks for checking for gaussian blur errors
Created attachment 315096 [details] shows the gaussian blur error when blurring a linear gamma sRGB tiff or png
Fix PNG loading: commit 3cc80b0a5c630c70b5989f45e68c3f4f4c925215 Author: Michael Natterer <mitch@gimp.org> Date: Mon Nov 23 18:44:17 2015 +0100 Bug 757783 - When opening linear gamma pngs or tiffs... ...many operations give wrong results Fix PNG loading to get the embedded profile first, and create a linear RGB image if the profile says so. plug-ins/common/file-png.c | 220 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 115 insertions(+), 105 deletions(-)
And fixed for TIFF: commit bc980cd73aea795dea1e453cb403c33c1f63375b Author: Michael Natterer <mitch@gimp.org> Date: Mon Nov 23 22:29:06 2015 +0100 Bug 757783 - When opening linear gamma pngs or tiffs... ...many operations give wrong results Same fix for TIFF: get the color profile first, then create a linear image if the profile says so. plug-ins/common/file-tiff-load.c | 437 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 281 insertions(+), 156 deletions(-)