Precision vs ICC profile "gamma" problems on export
Edit/Update: The original title of the bug report mentioned "gamma" problems and also artifacts. Massimo found the source of the artifacts, and that's been fixed, hence the change in the bug report title. The "gamma" issues upon export are still a problem. I'll add a new comment giving updated specifics.
Submitted by Elle Stone
Created attachment 370988 Process at 32f linear using babl transforms, convert to regular sRGB, export as png
Every now and again something goes wrong when doing an ICC profile conversion to a profile from disk. I'm not sure what all the relevant processing variables are, but these might be relevant:
When the XCF file is at 32f linear vs 32f gamma precision.
When using or not using the babl color tranforms.
When the selected profile from disk has a linear vs a perceptually uniform TRC.
When outputting to a png vs outputting to a tiff vs etc.
When the option to promote images to floating point precision upon import is checked in Preferences, possibly when combined with "Keep embedded profile".
The attached screenshot shows the result of:
- Processing a raw file with GIMP using the babl transforms at 32f linear precision
- Then converting to a regular sRGB profile from disk, which produces random horizontal artifact lines.
- Followed by exporting the resulting image to disk as a png, and then opening the resulting png: Somewhere there is a "gamma" conversion problem, whether in the saving or in the opening or in both.
At step 2, random horizontal lines sometimes -but not always - appear, as shown in the attached screenshot. Undoing the conversion to the profile from disk, and then saving to disk and closing the XCF file, and then reopening it, and then redoing the conversion to the profile from disk, changes the placement, color, and length of the artifact lines.
At step 3, the image looks normal as displayed in GIMP (other than the artifacts). But opening the exported png with GIMP shows that there is a gamma problem somewhere in the processing pipeline.
Version: git master