Commit Graph

14 Commits

Author SHA1 Message Date
Michael Natterer a28778475f 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.
2016-05-16 13:27:59 +02:00
Michael Natterer 406d1b9c65 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.
2016-05-14 23:50:58 +02:00
Michael Natterer af976a75c3 app: add a GimpColorConfig to GimpDisplayShell
Use the shell's color config for color managing the display and
various auxiliary widgets attached to it, like the notebook tab widget
and navigation popup.

The config is currently just a reference to the global prefs config,
so no behavior changed.
2016-05-14 00:56:26 +02:00
Michael Natterer 1b786f6479 app: typo in debug output in gimp_display_shell_profile_update() 2015-12-14 23:19:58 +01:00
Michael Natterer 0ad8c786b5 app: use the image's projectable format for profile conversion
which is RGB for RGB and INDEXED images, and GRAY for GRAY images.
2015-12-14 23:02:31 +01:00
Michael Natterer 396bc89e56 app: better temporary debug output in gimp_display_shell_profile_update() 2015-09-09 21:09:31 +02:00
Michael Natterer b45d31072b app, libgimpcolor: refactor GimpColorManaged::get_color_profile()
to not return a reference that has to be dropped. Also allow NULL to
be returned if the managed cannot have a profile. If it can have one,
get_color_profile() still always returns a profile (either the
assigned one, or a generated built-in one).
2015-09-03 01:36:02 +02:00
Michael Natterer fd0203ce80 libgimpwidgets: change parameters of gimp_widget_get_color_transform()
Change GimpColorManaged to GimpColorProfile.
2015-09-01 23:40:57 +02:00
Michael Natterer e669c6dd05 Bug 750874 - Displayed colors look clipped after profile conversion...
...but they aren't clipped

gimp_display_shell_profile_can_convert_to_u8(): allow the shortcut of
converting directly to 8-bit for display only for GIMP_COMPONENT_TYPE_U8.

This might be an lcms bug, the code can be enabled again for U16 and
U32 if it's indeed an lcms bug and it gets fixed.
2015-06-29 10:22:22 +02:00
Michael Natterer c876e281b1 Bug 750874 - Displayed colors look clipped after profile conversion...
but they aren't clipped

Add gimp_display_shell_profile_can_convert_to_u8() which returns
whether the lcms transform can safely write directly into an u8 buffer
without destroying out-of-gammut pixel values, which we assume is the
case for all integer formats. If the function returns FALSE, always
convert via the R'G'B'A float filter_buffer.

Also connect to the image's "precision-changed" signal and update the
profile transform when it's emitted.
2015-06-13 00:27:21 +02:00
Michael Natterer 5cdbf6ae33 app: always use an RGB format as source format for display color management 2015-06-12 20:15:19 +02:00
Michael Natterer 460948e068 app: add member GimpDisplayShell.filter_format
and use it where we used to hardcode "R'G'B'A float".
2015-06-02 00:01:28 +02:00
Michael Natterer 08545ad549 app: switch gimpdisplayshell-render.c to the new profile filter code
- disable auto-adding of the lcms display filter module

- change profile convert dest formats to be always R'G'B'A, a display
  profile transform outputs something that can be displayed directly,
  so no additional gamma transform must happen when the pixels are
  copied to a cairo-ARGB32 buffer

- add a medium forest of if() branches to gimpdisplayshell-filter.c
  which cover all combinations of profile and display filter
  transforms

- all of this is still very broken when changing an image to linear,
  because the configured RGB profile from prefs will do horrible
  nonsense (things work fine though with a per-image profile that is
  for linear data)
2015-06-01 23:30:03 +02:00
Michael Natterer 3267218143 app: add gimpdisplayshell-profile.[ch]
which will take over display color management from the display
filter module. This is WIP, the code is still unused.
2015-05-27 12:28:33 +02:00