1. 07 Oct, 2018 1 commit
    • Michael Natterer's avatar
      app: remove the image's "Enable Color Management" toggle · c399b894
      Michael Natterer authored
      It was not doing anything right since space invasion. We now treat the
      built-in sRGB profile like any other profile and never bypass
      conversions based on some weird toggle.
      
      Instead, introduce a "Use sRGB Profile" toggle which, when enabled,
      hides whatever profile away so the image actually uses the built-in
      sRGB profile.
      
      This is different from discarding and then re-assigning the same
      profile only by being faster and more convenient.
      c399b894
  2. 21 Jul, 2018 1 commit
    • Michael Natterer's avatar
      Initial space invasion commit in GIMP · e09e563a
      Michael Natterer authored
      All babl formats now have a space equivalent to a color profile,
      determining the format's primaries and TRCs. This commit makes GIMP
      aware of this.
      
      libgimp:
      
      - enum GimpPrecision: rename GAMMA values to NON_LINEAR and keep GAMMA
        as deprecated aliases, add PERCEPTUAL values so we now have LINEAR,
        NON_LINEAR and PERCPTUAL for each encoding, matching the babl
        encoding variants RGB, R'G'B' and R~G~B~.
      
      - gimp_color_transform_can_gegl_copy() now returns TRUE if both
        profiles can return a babl space, increasing the amount of fast babl
        color conversions significantly.
      
      - TODO: no solution yet for getting libgimp drawable proxy buffers in
        the right format with space.
      
      plug-ins:
      
      - follow the GimpPrecision change.
      
      - TODO: everything else unchanged and partly broken or sub-optimal,
        like setting a new image's color profile too late.
      
      app:
      
      - add enum GimpTRCType { LINEAR, NON_LINEAR, PERCEPTUAL } as
        replacement for all "linear" booleans.
      
      - change gimp-babl functions to take babl spaces and GimpTRCType
        parameters and support all sorts of new perceptual ~ formats.
      
      - a lot of places changed in the early days of goat invasion didn't
        take advantage of gimp-babl utility functions and constructed
        formats manually. They all needed revisiting and many now use much
        simpler code calling gimp-babl API.
      
      - change gimp_babl_format_get_color_profile() to really extract a
        newly allocated color profile from the format, and add
        gimp_babl_get_builtin_color_profile() which does the same as
        gimp_babl_format_get_color_profile() did before. Visited all callers
        to decide whether they are looking for the format's actual profile,
        or for one of the builtin profiles, simplifying code that only needs
        builtin profiles.
      
      - drawables have a new get_space_api(), get_linear() is now get_trc().
      
      - images now have a "layer space" and an API to get it,
        gimp_image_get_layer_format() returns formats in that space.
      
      - an image's layer space is created from the image's color profile,
        change gimpimage-color-profile to deal with that correctly
      
      - change many babl_format() calls to babl_format_with_space() and take
        the space from passed formats or drawables
      
      - add function gimp_layer_fix_format_space() which replaces the
        layer's buffer with one that has the image's layer format, but
        doesn't change pixel values
      
      - use gimp_layer_fix_format_space() to make sure layers loaded from
        XCF and created by plug-ins have the right space when added to the
        image, because it's impossible to always assign the right space upon
        layer creation
      
      - "assign color profile" and "discard color profile" now require use
        of gimp_layer_fix_format_space() too because the profile is now
        embedded in all formats via the space.  Add
        gimp_image_assign_color_profile() which does all that and call it
        instead of a simple gimp_image_set_color_profile(), also from the
        PDB set-color-profile functions, which are essentially "assign" and
        "discard" calls.
      
      - generally, make sure a new image's color profile is set before
        adding layers to it, gimp_image_set_color_profile() is more than
        before considered know-what-you-are-doing API.
      
      - take special precaution in all places that call
        gimp_drawable_convert_type(), we now must pass a new_profile from
        all callers that convert layers within the same image (such as
        image_convert_type, image_convert_precision), because the layer's
        new space can't be determined from the image's layer format during
        the call.
      
      - change all "linear" properties to "trc", in all config objects like
        for levels and curves, in the histogram, in the widgets. This results
        in some GUI that now has three choices instead of two.
        TODO: we might want to reduce that back to two later.
      
      - keep "linear" boolean properties around as compat if needed for file
        pasring, but always convert the parsed parsed boolean to
        GimpTRCType.
      
      - TODO: the image's "enable color management" switch is currently
        broken, will fix that in another commit.
      e09e563a
  3. 11 Jul, 2018 1 commit
  4. 21 Aug, 2017 1 commit
    • Michael Natterer's avatar
      Move the new "default_new_layer_mode" APIs to the image... · e16c8a23
      Michael Natterer authored
      ...in both the core and libgimp.
      
      Images now know what the default mode for new layers is:
      
      - NORMAL for empty images
      - NORMAL for images with any non-legacy layer
      - NORMAL_LEGAVY for images with only legacy layers
      
      This changes behavior when layers are created from the UI, but *also*
      when created by plug-ins (yes there is a compat issue here):
      
      - Most (all?) single-layer file importers now create NORMAL layers
      - Screenshot, Webpage etc also create NORMAL layers
      
      Scripts that create images from scratch (logos etc) should not be
      affected because they usually have NORMAL_LEGACY hardcoded.
      
      3rd party plug-ins and scripts will also behave old-style unless they
      get ported to gimp_image_get_default_new_layer_mode().
      e16c8a23
  5. 20 Aug, 2017 1 commit
  6. 01 May, 2017 1 commit
  7. 26 Feb, 2017 1 commit
  8. 08 Jan, 2017 1 commit
  9. 17 Sep, 2016 1 commit
  10. 08 May, 2016 2 commits
  11. 03 May, 2016 1 commit
  12. 08 Mar, 2016 1 commit
  13. 12 Feb, 2016 1 commit
  14. 16 Aug, 2015 2 commits
  15. 02 Aug, 2015 1 commit
  16. 19 Jun, 2015 1 commit
  17. 17 Jun, 2015 2 commits
  18. 03 Jun, 2014 1 commit
  19. 02 Jun, 2014 1 commit
  20. 02 May, 2014 1 commit
  21. 14 Oct, 2013 1 commit
    • Michael Natterer's avatar
      app,libgimp*: fix includes to follow our include policy · 697572cc
      Michael Natterer authored
      - don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
      - instead, include it in many .c files instead of <glib-object.h>,
        finally acknowledging the fact that app/ depends on gdk-pixbuf almost
        globally
      - fix up includes as if libgimpbase depended in GIO, which it soon will
      697572cc
  22. 23 Jun, 2013 1 commit
    • Michael Natterer's avatar
      Add support for both gamma-corrected and linear for all bit depths · caf73f5f
      Michael Natterer authored
      - Add new enum GimpComponentType which contains u8, u16, u32 etc.
      - Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
      - Add all the needed formats to gimp-babl.c
      - Bump the XCF version to 5 and make sure version 4 with the old
        GimpPrecision enum values is loaded correctly
      
      This change blows up the precision enums in "New Image" and
      Image->Precision so we can test all this stuff. It is undecided what
      format will be user-visible options in 2.10.
      caf73f5f
  23. 02 May, 2012 10 commits
  24. 02 Mar, 2011 1 commit
  25. 05 Jun, 2010 1 commit
  26. 09 Feb, 2010 2 commits
  27. 17 Jan, 2009 1 commit
    • Michael Natterer's avatar
      Change licence to GPLv3 (and to LGPLv3 for libgimp). · d9b5207a
      Michael Natterer authored
      2009-01-17  Michael Natterer  <mitch@gimp.org>
      
      	* all files with a GPL header and all COPYING files:
      
      	Change licence to GPLv3 (and to LGPLv3 for libgimp).
      
      	Cleaned up some copyright headers and regenerated the parsers in
      	the ImageMap plugin.
      
      
      svn path=/trunk/; revision=27913
      d9b5207a