1. 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.
      - 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.
      - follow the GimpPrecision change.
      - TODO: everything else unchanged and partly broken or sub-optimal,
        like setting a new image's color profile too late.
      - 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
      - TODO: the image's "enable color management" switch is currently
        broken, will fix that in another commit.
  2. 11 Jul, 2018 1 commit
  3. 20 May, 2018 1 commit
  4. 23 Apr, 2018 1 commit
  5. 20 Apr, 2018 1 commit
  6. 05 Feb, 2018 2 commits
  7. 17 Dec, 2017 5 commits
  8. 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().
  9. 20 Aug, 2017 1 commit
  10. 19 Aug, 2017 1 commit
  11. 26 Feb, 2017 1 commit
  12. 20 Feb, 2017 1 commit
  13. 17 Feb, 2017 1 commit
    • Ell's avatar
      app: add GimpLayerModeContext enum · c3d2f57e
      Ell authored
      A bitmask, specifying in which contexts a layer mode is applicable.
      Can be a combination of:
        - LAYER: usable as a layer mode for actual layers.
        - GROUP: usable as a layer mode for layer groups.  Currently, all
          modes that specify LAYER also specify GROUP, and vice versa,
          but the planned pass-through mode will be GROUP only.
        - PAINT: can be used as a paint mode.
        - FADE: can be used for fading.
      Add a 'context' field to _GimpLayerModeInfo, and provide context
      masks to all the modes.
      Use the context mask for validation when setting a layer's mode.
      The next commit will use the mask when populating the layer mode
  14. 12 Feb, 2017 1 commit
  15. 01 Feb, 2017 1 commit
  16. 09 Jan, 2017 1 commit
  17. 08 Jan, 2017 1 commit
  18. 09 Oct, 2016 1 commit
    • Michael Natterer's avatar
      Bug 764024 - Allow to choose fill color when resizing layers and images · 997ae1e2
      Michael Natterer authored
      Add a GimpFillType argument to GimpItem::resize() and fill type
      widgets to the canvas and layer resize dialogs. Fill the new parts of
      the drawable according to fill type in gimp_drawable_resize(). Make
      sure places that need the old behavior get GIMP_FILL_TRANSPARENT
      passed by hardcoding it in the GimpItem::resize() implemetations of
      channel, mask, selection etc.
  19. 21 Sep, 2016 1 commit
  20. 02 Sep, 2015 1 commit
  21. 16 Aug, 2015 1 commit
  22. 02 Aug, 2015 1 commit
  23. 26 Jun, 2015 1 commit
  24. 19 Jun, 2015 2 commits
  25. 17 Jun, 2015 1 commit
  26. 29 Apr, 2015 1 commit
    • Michael Natterer's avatar
      Bug 673501 - Issue with Overlay · bc4cf991
      Michael Natterer authored
      GIMP's OVERLAY mode was identical to SOFTLIGHT. This commit fixes the
      issue and introduces a NEW_OVERLAY mode and enum value.
      - change gimp:overlay-mode to be a real (svg-ish) overlay mode
      - when compositing, map OVERLAY to gimp:softlight-mode
      - when compisiting, map NEW_OVERLAY to gimp:overlay-mode
      - bump the XCF version when NEW_OVERLAY is used
      - map OVERLAY to SOFTLIGHT when loading and saving XCF
      - map OVERLAY to softlight in all PDB setters
      - map OVERLAY to softlight when deserializing a GimpContext
      - change all paint mode menus to show an entry for NEW_OVERLAY
        instead of OVERLAY
      - change PSP, PSD and OpenRaster to use NEW_OVERLAY
      These changes should (redundantly) make sure that no OVERLAY enum
      value is used in the core any longer because it gets mapped to
      SOFTLIGHT at all entry points, with the downside of introducing a
      setter/getter asymmetry when OVERLAY was set in a PDB api.
  27. 12 Jul, 2014 1 commit
    • Michael Natterer's avatar
      app: some GimpProgress cleanup · a6601d56
      Michael Natterer authored
      - change start() and set_text() to use "format" and "..." instead of
        "message", allowing to format progress messages in place
      - s/cancelable/cancellable/
      - move "cancellable" to be the second argument of start()
  28. 03 May, 2014 1 commit
  29. 29 Apr, 2014 1 commit
    • Michael Natterer's avatar
      libgimpbase,*: clean up enum values in gimpbaseenums.h · 22c22229
      Michael Natterer authored
      GIMP_ADD_foo_MASK -> GIMP_ADD_MASK_foo
      GIMP_foo_MODE -> GIMP_BLEND_foo
      GIMP_foo_CLONE -> GIMP_CLONE_foo
      GIMP_foo -> GIMP_DODGE_BURN_TYPE_foo
      GIMP_foo -> GIMP_TRANSFER_foo
      Add compat values for the old names and compat code to script-fu
      and pygimp.
  30. 19 Nov, 2013 1 commit
  31. 30 Sep, 2013 1 commit
  32. 13 Sep, 2013 1 commit
  33. 22 Jun, 2013 1 commit
  34. 09 Nov, 2012 1 commit
    • Michael Natterer's avatar
      Bug 674160 - Redesign of "Lock panel" · d4933b30
      Michael Natterer authored
      Apply and heavily modify patch from remyDev which adds "lock position"
      to GimpItem, similar to "lock content". Lock position disables all
      sorts of translation and transform, from the GUI and the PDB.
      Cleaned up some aspects of the lock content code as well because a
      second instance of similar code always shows what went wrong the first