Retain last user-chosen ICC profile information when generating "TRC variants"
I just opened an XCF file that I created awhile back. Somewhere in the processing steps I did a precision change, resulting in the original ICC profile information being replaced by the not-very-informative "TRC variant generated by GIMP". It seems all record of the original ICC profile is gone.
The primaries that one uses to process an image do significantly affect the results of operations involving multiply/divide, including results of using Levels to white-balance an image. Plus it's just weird to see "TRC variant" and not have a clue what profile the variant was made from.
It would be useful for users to:
-
Know what the actually embedded ICC profile was when the image was first imported from disk, if there was an embedded ICC profile, or else the user-assigned profile if the user immediately assigns a new profile (which might even be one of GIMP's built-in sRGB profiles).
The best way to accomplish this is to retain a copy of the originally embedded or assigned ICC profile somewhere in the XCF file. If the user then elects to do a profile conversion to a new ICC profile from disk, or else if they elect to assign a profile from disk, replace the "first imported from disk or assigned" profile with the newly-selected profile from disk.
This "saving of the user-chosen profile in the XCF file" shouldn't just be informational, but should also make it possible for the user to convert the image back to the last user-chosen profile.
It might be best to always save the originally embedded profile (if there is one) when importing an image from disk, as the user might choose to assign or convert to a built-in sRGB profile upon importing the image, and still want to convert the image to the originally embedded profile before exporting the edited image to disk.
-
When creating an image from scratch, know what the original ICC profile was, whether built-in sRGB or an "on-disk" ICC profile, and again retain a copy somewhere saved in the XCF file.
Again, if the user then elects to do a profile conversion to a new ICC profile from disk or else elects to assign a profile from disk, replace the "first imported from disk" profile with the newly-selected profile from disk.
And again, the saved profile shouldn't just be informational, but also allow the user to convert the image to the last user-chosen profile.
-
Have access to the current GIMP-generated profile's primaries, perhaps in the "Image Properties" dialog.
-
For GIMP-2.99, allow users to know the actually used TRC in the current GIMP-generated profile, again perhaps in the "Image Properties" dialog.
Items 1 and 2 above merely restore parity between GIMP and most other image editors, which as a rule don't generate "mystery" profiles to replace profiles chosen by the user (let's assume that the user in some sense did choose whatever profile might be embedded in an imported image, even if they didn't actually create the image and perhaps didn't know what the embedded profile actually was until they opened the image in GIMP).
This restored parity would make it considerably easier for users to convert the image to the last user-chosen profile or else to the originally embedded profile, before exporting the image to disk. Currently, if the user doesn't remember the original profile, or doesn't have their own on-disk copy of the original profile, they are stuck with whatever profile variant GIMP last generated.
A benefit of converting back to a user-chosen profile that's not a TRC variant generated by GIMP is avoiding the situation where the user opens a GIMP-exported image with some other image editor, that then displays the not helpful description tag "TRC variant generated by GIMP", again leaving the user wondering "well, what profile is it?"
Items 3 and 4 are for the benefit of more "color space savvy" users who can tell the intended RGB color space just from the primaries, and with the addition of the TRC information they can pick a matching profile from disk.