• Jehan's avatar
    plug-ins: follow the assigned profile TRC. · 417f2c87
    Jehan authored
    GIMP should not convert assigned profile to sRGB just because we stored
    as linear on the XCF. In other words, we should not look at the image
    precision to decide whether to export as linear (previously only 8-bit
    linear images), but at the profile TRC. There are basically 3 cases:
    (1) We don't save a profile, then convert to sRGB whatever the source
    precision (because readers would assume sRGB for a no-profile jpeg).
    (2) We save the default profiles: convert to sRGB because it's usually
    a better choice for 8-bit formats and even working at 32-bit float
    *linear* doesn't mean you want to export as 8-bit int *linear*. As the
    image creator made no explicit export choice, we make an acceptable
    default one.
    (3) We save an explicitly assigned profile: keep the profile TRC, don't
    convert!
    
    Note that this apparently won't work perfectly right now, as GIMP
    replaces the original TRC with the linear default TRC when converting to
    linear. So the expected TRC is lost in such case when you have not
    explicitly reset the correct profile. Yet this is on GIMP side and this
    part of the issue should be fixed with the space invasion merge. For
    now, this is how the plug-in should work.
    
    This is based on my late discussion with Ell. Please everyone, and Ell
    especially, review! :-)
    
    (cherry picked from commit c5f7bac2)
    417f2c87
Name
Last commit
Last update
..
common Loading commit data...
file-bmp Loading commit data...
file-dds Loading commit data...
file-exr Loading commit data...
file-faxg3 Loading commit data...
file-fits Loading commit data...
file-fli Loading commit data...
file-ico Loading commit data...
file-jpeg Loading commit data...
file-psd Loading commit data...
file-raw Loading commit data...
file-sgi Loading commit data...
file-tiff Loading commit data...
file-webp Loading commit data...
flame Loading commit data...
fractal-explorer Loading commit data...
gfig Loading commit data...
gimpressionist Loading commit data...
gradient-flare Loading commit data...
help Loading commit data...
help-browser Loading commit data...
ifs-compose Loading commit data...
imagemap Loading commit data...
lighting Loading commit data...
map-object Loading commit data...
metadata Loading commit data...
pagecurl Loading commit data...
print Loading commit data...
pygimp Loading commit data...
screenshot Loading commit data...
script-fu Loading commit data...
selection-to-path Loading commit data...
twain Loading commit data...
ui Loading commit data...
.gitignore Loading commit data...
Makefile.am Loading commit data...