GNOME Bugzilla – Bug 320447
fast switching between "color managed display" and "softproof"
Last modified: 2016-09-30 21:14:15 UTC
It would be very useful to have a fast per window switcher between "no color management", "color managed display" and "printer emulation". A common situation is working on a photo that should go to both web and photolab. Currently a user has to go to Preferences dialog and do it all there. This adds more mouse clicks, which is not really pleasant when you are about to process ca. 200 snapshots from last photosession. Also, rendering intent settings should be easier accessible. Solution would be in adding 2 submenus to View top menu: Color management Disabled Color managed display Softproofing (or Printer emulation) Rendering intent Perceptual Relative colorimetric Saturation Absolute colorimetric I would place these submenus below "Screen filters" menu item. If ICC profile for display is missing, only "Disabled" or "Softproofing" should menu items are enabled. If printer profile is missing, only "Disabled" and "Color managed display" menu items should be enabled. Other information:
Well, this is already planned but it doesn't make sense to implement this before color management is completely in place.
Let's aim for 2.8 for this.
This would be very cool. I'm sure this is probably planned but might I suggest that the current Color Management mode be displayed in the image window, where the filename, pixel dimensions and other information is currently displayed. I for one have a tenancy to forget which mode I'm using.
According to the current estimates we will not have time to implement this for 2.8. Postponing to 2.10.
Created attachment 152769 [details] [review] 0001-WiP-Add-View-Show-Soft-Proofing.patch I might as well attach the code I wrote a few months ago, it just adds a menu item.
This allows to set the mode per display, do we really need the rendering intent? I have no clue what it is good for anyway. commit 406d1b9c6579d59b23b95bac6400b214e8b1526f Author: Michael Natterer <mitch@gimp.org> Date: Sat May 14 23:50:58 2016 +0200 Bug 320447 - fast switching between "color managed display" and "softproof" Add a View -> Color Management submenu that allows to change the color management mode per-display. Internally, keep a GimpColorConfig object around per-display that is synchronized with the global config except for the properties that have a per-display GUI (currently the mode). Also provide an "As in Preferences" menu item to follow the global settings again. app/actions/view-actions.c | 65 ++++++++++++++++++++ app/actions/view-commands.c | 42 +++++++++++++ app/actions/view-commands.h | 161 ++++++++++++++++++++++++++------------------------ app/display/gimpdisplayshell-handlers.c | 125 +++++++++++++++++++++++++++++---------- app/display/gimpdisplayshell-profile.c | 100 ++++++++++++++++++++++++++----- app/display/gimpdisplayshell-profile.h | 4 +- app/display/gimpdisplayshell.c | 10 +--- app/display/gimpdisplayshell.h | 1 + app/widgets/gimphelp-ids.h | 1 + 9 files changed, 379 insertions(+), 130 deletions(-)
I think rendering intent can be skipped as long a GIMP reads the one set for printer simulation in prefs.
The per-image View menu needs to allow the user to set all the soft proofing options that can be set in Preferences, that is: Print simulation profile Rendering intent Whether to use or not use black point compensation Whether to show or not show the gamut check When soft proofing to a printer profile the rendering intent and whether to use black point compensation do make visually obvious differences, and the user needs to be able to freely switch back and forth to decide the right settings. The ability to switch the gamut checks on and off is very important as the gamut checks only tell you "out of gamut" but don't tell you "how far out of gamut", so with the gamut check on you can't see whether the out of gamut colors are visibly posterized or not. The Preferences dialog is very large, taking up a huge amount of screen real estate. But if all of the soft proofing controls aren't available in the View menu, then when soft proofing the user must also have the Preferences Dialog open, and then check "As in Preferences", to be able to switch between rendering intents, using/not using black point compensation, and whether to show or not show the gamut check. And of course the Preference dialog choices will affect all open images that one might be trying to soft proof, making side by side comparisons of different soft proofing settings impossible.
Ok thanks that makes sense. I take it we can safely skip rendering intent and bpc settings for "Color Managed Display" mode?
(In reply to Michael Natterer from comment #9) > Ok thanks that makes sense. I take it we can safely skip rendering > intent and bpc settings for "Color Managed Display" mode? I'd suggest skipping these settings for now and re-evaluate if someone files a bug report.
Done, even with setting intent and bpc for all management modes. Missing: profile choice for softproof, I'm not quite sure yet how to implement this via a menu. commit a28778475f8c2fecb5961ccb5c0afe98c4037db9 Author: Michael Natterer <mitch@gimp.org> Date: Mon May 16 13:27:59 2016 +0200 Bug 320447 - fast switching between "color managed display" and "softproof" Add rendering intent, black point compensation and gammut warning menu items to View -> Color Management. They set the respective values of the active color management mode, so both "color managed display" and "print simulation" are almost completely configurable per-display now. Setting the simulation profile is still missing. app/actions/view-actions.c | 109 +++++++++++++++++++++++++++++++++++++++++++++++--- app/actions/view-commands.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++ app/actions/view-commands.h | 8 ++++ app/display/gimpdisplayshell-handlers.c | 7 +++- app/display/gimpdisplayshell-profile.c | 66 ++++++++++++++++++++++++++++-- menus/image-menu.xml.in | 8 ++++ 6 files changed, 290 insertions(+), 11 deletions(-)
(In reply to Michael Natterer from comment #11) > Missing: profile choice for softproof, I'm not quite sure yet how > to implement this via a menu. If it helps suggest ideas, these pages shows how PhotoShop and Cinepaint handle the soft proofing dialog: PhotoShop: http://www.color-management-guide.com/print-with-photoshop.html http://www.color-management-guide.com/images/color-management-photoshop/menu-proof-setup.jpg Cinepaint (a total PIA for actually trying to edit an image, but the soft proof dialog was maybe nicer than the PhotoShop dialog): http://www.behrmann.name/cms/cinepaint/bildbearbeitung/cinepaint_ccorrection.html http://www.behrmann.name/images/artikel/cinetut/view_menu_0.20.png http://www.behrmann.name/images/artikel/cinetut/image_menu_0.20.png Notice PhotoShop has some options that GIMP doesn't have, and I think Cinepaint also had these options: simulate paper color and simulate black ink. At some point it would be nice for GIMP to have these additional options. But this is an enhancement that I think can wait. I don't know what the algorithms are (they simulate the darkest dark ink and lightest light of the paper that's being used), but I'm sure the information is available from the LCMS API or mailing list.
If LCMS supports these additional options, it's no problem to add them quickly. Every place that needs conversions or settings should now have the needed code implemented, so adding features is a minor effort.
(In reply to Michael Natterer from comment #13) > If LCMS supports these additional options, it's no problem to add > them quickly. Every place that needs conversions or settings should > now have the needed code implemented, so adding features is a minor > effort. I downloaded the Cinepaint code to see what lcms1 options might correspond to simulating paper color and black ink and found this line of code: menus_set_state ("<Image>/View/Simulatate Paper", gdisp->cms_proof_flags == INTENT_ABSOLUTE_COLORIMETRIC); This almost looks like absolute colorimetric intent is the same as "simulate paper". I'll ask on the LCMS mailing list and also ask a person I know who uses PhotoShop and likely has a very good understanding of PhotoShop soft proofing.
(In reply to Elle Stone from comment #14) > (In reply to Michael Natterer from comment #13) > > If LCMS supports these additional options, it's no problem to add > > them quickly. Every place that needs conversions or settings should > > now have the needed code implemented, so adding features is a minor > > effort. > > I downloaded the Cinepaint code to see what lcms1 options might correspond > to simulating paper color and black ink and found this line of code: > > menus_set_state ("<Image>/View/Simulatate Paper", gdisp->cms_proof_flags == > INTENT_ABSOLUTE_COLORIMETRIC); > > This almost looks like absolute colorimetric intent is the same as "simulate > paper". I'll ask on the LCMS mailing list and also ask a person I know who > uses PhotoShop and likely has a very good understanding of PhotoShop soft > proofing. It turns out that "simulate paper" almost certainly is something more than using absolute colorimetric intent. Here's the LCMS mailing list thread: https://sourceforge.net/p/lcms/mailman/message/35098546/ See in particular the reference to "adaptation state": "For the lcms2 API one needs to set the adaption state". Awhile back I received a private email request to add code to GIMP that allows to use the LCMS2 adaptation code. I think this is a very good idea that perhaps should be in its own bug report. Though if you want to go ahead and incorporate the adaptation code now, I'll be happy to start digging into the LCMS API.
Pease do, that would be a great help. If it's not a huge change, we can easily do it for 2.10. If it is, we can still check if we need to adapt some public GIMP APIs now, so we don't have to start deprecating stuff right after 2.10.
Next iteration: when softproof is active, "color managed display" is active too, reflect this in the "View" menu: commit dcf5c526e7f6825beb690419d18b1cdf09e31cd9 Author: Michael Natterer <mitch@gimp.org> Date: Sat May 21 21:38:47 2016 +0200 Bug 320447 - fast switching between "color managed display" and "softproof" Replace the 3-state "off", "display" and "softproof" radio items by two toggles "enable" and "softproof". Also add separate controls for display and softproof options. app/actions/view-actions.c | 188 ++++++++++++++++++++++++++++++++------------------- app/actions/view-commands.c | 166 ++++++++++++++++++++++++++++++--------------- app/actions/view-commands.h | 16 +++-- app/display/gimpdisplayshell-profile.c | 81 ++++++++++++++-------- menus/image-menu.xml.in | 28 +++++--- 5 files changed, 310 insertions(+), 169 deletions(-)
I asked about the "emulate" options on the lcms mailing list and received somewhat contradictory responses (https://sourceforge.net/p/lcms/mailman/message/35098546/). Apparently Oyranos has LCMS2 code that makes possible the LCMS1 "emulate" option in Cinepaint (which uses/used LCMS1). So I'll take a look at the Oyranos code hopefully tomorrow. In a private email a person familiar with PhotoShop and LCMS mentioned the same LCMS2 function that Kai-Uwe mentioned in the LCMS mailing list thread, which is "cmsSetAdaptationState". About the View/Color Management menu: 1. The menu is missing the option to choose the output profile. Some users (including me) will want the option to soft proof to more than one output profile at the same time, either sequentially choosing different output profiles for the same view, or else having more than one copy of the image open and choosing a different output profile for each copy (eg sRGB for the web, a higher end printer/paper profile for making a nicer print, and perhaps a chromira or frontier profile for more affordable prints). Currently the only way to choose the output profile is through the global color management settings in Preferences. 2. The menu seems a little more awkward to use compared to what I remember of using the equivalent Cinepaint and PhotoShop menus. Tomorrow I plan to install Cinepaint on my laptop (probably means installing OpenSuse) so I can refresh my memory and maybe make some screenshots. 3. Maybe the option to uncheck "Color Manage this View" - which really does disable color management, unlike certain similar sounding options in "Image/Color Management" and "New Image" :) - could be moved down to the bottom of the View/Color Management menu?
Well, Photoshop has (or used to have) this: 1. 'View -> Proof Setup' submenu with options like 'Custom...' (where you setup softproofing), Working CMYK, Working C/M/Y/K Plate (4 options), Macintosh RGB, Windows RGB etc. 2. 'View -> Proof Colors' menu item that toggles softproofing.
Regarding the PhotoShop soft proofing options: http://www.color-management-guide.com/color-information-in-photoshop.html Specifically this image: http://www.color-management-guide.com/images/color-management-photoshop/view-proof-setup-custom.jpg Nice explanation of what all the check boxes do: http://www.cambridgeincolour.com/tutorials/soft-proofing.htm
I put up screenshots illustrating three fairly serious problems with using LCMS to soft proof unbounded floating point images: http://ninedegreesbelow.com/bug-reports/soft-proofing-problems.html The problems are: 1. Soft proofing gives different results when using linear precision compared to gamma precision (this is also true when using integer precision). 2. Soft proofing gives different results when soft proofing from a large gamut color space (where more of the colors are in gamut with respect to the source color space), compared to soft proofing after converting the image to unbounded sRGB. 3. Soft proofing from GIMP's built-in sRGB profile to an sRGB profile from disk shows that all the colors are in gamut, even when the entire image is composed of pretty much nothing but out of gamut colors. Depending on the user's monitor, the image will look very different when exported to disk at integer precision and then uploaded to the web or opened with GIMP. Here is a workaround for the LCMS soft proofing issues that perhaps could be coded into GIMP to make for much better soft proofing results: 1. Open the image to be soft proofed. 2. Promote precision to 32f. 3. If necessary, change precision to gamma (because for step 8 we are interested in perceptually uniform differences). 4. Make a copy of the image. 5. Use LCMS to convert the copy to the soft proofing profile using the user-set soft proofing rendering intent and black point compensation if checked. 6. Change the precision of the converted copy to 32-integer to clip any out of gamut channel values (in case the destination profile supports unbounded RGB). 7. Use the converted and clipped copy to show as the "soft proofed image". 8. For the gamut check, drag the converted and clipped copy back to the original image's layer stack as a second layer, and take the difference between the original and soft proofed image to show the out of gamut colors. This will have the advantage of showing "how far" out of gamut instead of just "out of gamut" vs "not out of gamut". Maybe all this should be in a separate bug report, but having per image soft proofing options isn't so useful when soft proofing itself doesn't produce reliable results.
(In reply to Elle Stone from comment #18) > 2. The menu seems a little more awkward to use compared to what I remember > of using the equivalent Cinepaint and PhotoShop menus. Tomorrow I plan to > install Cinepaint on my laptop (probably means installing OpenSuse) so I can > refresh my memory and maybe make some screenshots. I did install OpenSuse and Cinepaint on my laptop, but Cinepaint doesn't actually function, so no screenshots. Sigh.
Created attachment 328560 [details] Cinepaint View menu for Color Management/soft proofing choices (In reply to Elle Stone from comment #22) > but Cinepaint doesn't actually function, so no screenshots. Sigh. Hmm, user error. After putting the ICC profiles in /usr/share/icc, now Cinepaint allows to make color management choices. What makes the Cinepaint View dialog for "per image" soft proofing and color management somewhat more convenient than GIMP's current dialog is that Cinepaint puts these choices at the very top of the View menu as top level items, with second-level flyouts for choosing the rendering intent (and no option to choose the soft proofing profile on a per image basis, though PhotoShop does offer this very important option). GIMP's View menu puts the Color Management choices in a second-level menu, with third level menus for the rendering intent and such.
(In reply to Elle Stone from comment #10) > (In reply to Michael Natterer from comment #9) > > Ok thanks that makes sense. I take it we can safely skip rendering > > intent and bpc settings for "Color Managed Display" mode? > > I'd suggest skipping these settings for now and re-evaluate if someone files > a bug report. (In reply to Michael Natterer from comment #11) > Done, even with setting intent and bpc for all management modes. > I'm glad you added the rendering intent and bpc for "Color Managed Display" mode, because I did get a private email (from someone who does a great deal more soft proofing than I do) saying that those options most definitely do belong on the "View/Color Management" menu. However, testing, I can't seem to activate "Use black point compensation" from the "View/Color Management" menu, whether for "Display rendering intent" or for "Simulation Rendering intent". The equivalent choices in the global Preferences/Color Management menu do work just fine.
And I can't seem to set softproofing, something is clearly wrong there, investigating.
This should fix it. I broke it when adding the display transform cache... commit 710ba9bef3c682cb21175c00cb9ac23361f90d7f Author: Michael Natterer <mitch@gimp.org> Date: Mon May 30 01:16:07 2016 +0200 app: make display color management work with the transform cache Need to connect_after() to the shell's GimpColorConfig "notify" so the profile transform cache in gimp_widget_get_color_transform() is already invalidated when we call gimp_color_managed_profile_changed() in the shell's notify callback. This is a hack. Actually the shell should create its transform only on demand, and a config change should simply get rid of the previous transform, just as all other widgets are doing it. app/display/gimpdisplayshell-profile.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
(In reply to Elle Stone from comment #21) > I put up screenshots illustrating three fairly serious problems with using > LCMS to soft proof unbounded floating point images: > http://ninedegreesbelow.com/bug-reports/soft-proofing-problems.html > This comment by Marti might be applicable to the problems of soft proofing floating point images: https://sourceforge.net/p/lcms/mailman/message/35178784/ "A profile created in this way, with primaries and parametric curves, behaves like a "perfect" profile. That is, it can be inverted with no loss and its gamut is infinite. You can operate this profile with negative rgb or xyz values. Or with values well over 255. And the roundtrip is exact. So, if you tries to emulate which artifacts the profile causes, the answer is none and this is what you are getting in your softproofing. Built-in srgb behaves in same way. Another thing is when you flush the profile to disk. Then you are forcing a quantized representation (in the case of v2) Also, doing that imposes a gamut because no negative numbers or highlights over L* 100 are allowed in the file format. Then softproofing shows you the limitations the file format has. So you have to choose whatever the ideal representation and the file based." I don't understand exactly what Marti is getting at. But without some way for the user to see the actual soft proofed image as it will look when converted to the destination profile *and* saved to disk as a file type that doesn't preserve out of gamut channel values, maybe it would be better to just disabling the ability to soft proof at floating point precision.
All built-in GIMP profiles behave like the were loaded from disk, we added a save/load (via memory) round-trip after you noticed this difference a while ago.
(In reply to Michael Natterer from comment #28) > All built-in GIMP profiles behave like the were loaded from disk, > we added a save/load (via memory) round-trip after you noticed this > difference a while ago. Yes, I know, so I don't understand what the actual recommendation on the mailing list really meant. I suppose flushing the image itself to "disk" at integer precision would work. What about adding clipping code to clamp channel values between 0.0 and 1.0, right after the soft proofing transform has been done? Perhaps in the function "gimp_color_transform_process_buffer" (https://git.gnome.org/browse/gimp/tree/libgimpcolor/gimpcolortransform.c#n423)? The function would probably need some "if/then" code to deal with "soft proofing/not soft proofing". I made a couple of posts to the LCMS mailing list explaining the problems, and hopefully some changes can be made right in LCMS: https://sourceforge.net/p/lcms/mailman/message/35271294/ https://sourceforge.net/p/lcms/mailman/message/35271284/ But this perhaps isn't likely to happen: https://sourceforge.net/p/lcms/mailman/message/35271313/
(In reply to Elle Stone from comment #29) > I made a couple of posts to the LCMS mailing list explaining the problems, > and hopefully some changes can be made right in LCMS: > https://sourceforge.net/p/lcms/mailman/message/35271294/ > https://sourceforge.net/p/lcms/mailman/message/35271284/ > > But this perhaps isn't likely to happen: > https://sourceforge.net/p/lcms/mailman/message/35271313/ Well, maybe there is hope: https://sourceforge.net/p/lcms/mailman/message/35273448/
Thanks, that does indeed sound better. I think I'll rely on you to tell me what to do when the time comes :)
This makes the proof profile configurable per view. AFAICS this was the last missing bit here, please tell me if I'm wrong. commit beb3279bf2ea69d957af7dbc81faa502769b63e9 Author: Michael Natterer <mitch@gimp.org> Date: Fri Sep 30 20:54:10 2016 +0200 Bug 320447 - fast switching between "color managed display" and "softproof" Add a SELECT_SOFTPROOF_PROFILE mode to the color profile dialog and use it to select a profile from a newly added "Soft-Proofing Profile..." menu item in view -> color management. app/actions/view-actions.c | 7 ++++ app/actions/view-commands.c | 83 ++++++++++++++++++++++++++++++++++++++++++--- app/actions/view-commands.h | 2 ++ app/dialogs/color-profile-dialog.c | 91 ++++++++++++++++++++++++++++++++------------------ app/dialogs/color-profile-dialog.h | 3 +- app/display/gimpdisplayshell-handlers.c | 1 + app/display/gimpdisplayshell-profile.c | 2 ++ app/widgets/gimppropwidgets.c | 7 ++-- app/widgets/gimpwidgets-constructors.c | 24 ++++++++++--- menus/image-menu.xml.in | 1 + 10 files changed, 176 insertions(+), 45 deletions(-)
This looks really good, excepting the fact that I never did look into the LCMS code for chromatic adaptation (Comment 15 above) - my apologies! As already noted, the LCMS 2.7/2.8 soft proofing gamut checks don't work except for very specific circumstances. The current LCMS approach to soft proofing is very printer-oriented, only works if the source profile has a perceptually uniform TRC, and doesn't work at all if the destination profile can support unbounded ICC profile conversions, even if the image itself is at integer precision. This page has 3 downloadable test files that can be used to demonstrate the various issues: http://ninedegreesbelow.com/files/soft-proof/soft-proofing.html It's not clear whether the current LCMS soft proofing code will change in the near future (https://github.com/Beep6581/RawTherapee/issues/3406#issuecomment-246199885). PhotoFlow linear_gamma branch (https://github.com/aferrero2707/PhotoFlow/tree/linear_gamma) has code that seems to work pretty well, that: * works around the current LCMS gamut check limitations * includes different gamut checks when using or not using black point compensation for relative colorimetric conversions (which PhotoShop has but LCMS doesn't have) * deals with unbounded ICC profile conversions * includes very nicely working code for emulating paper white and ink black Would it be appropriate to open a new bug report for noting that there are serious limitations on the useability of the current LCMS soft proofing? which possibly could be solved by porting over the PhotoFlow capabilities/LCMS workarounds? And perhaps a second new bug report for the chromatic adaptation slider?
Thanks :) Yes I think new bugs do make sense, this one has served its purpose and more stuff doesn't make it more readable.
https://bugzilla.gnome.org/show_bug.cgi?id=772266 for the soft proofing issues. I'll add a bug report for the chromatic adaptation sliders tomorrow.