1. 02 Dec, 2018 1 commit
  2. 01 Dec, 2018 2 commits
  3. 30 Nov, 2018 1 commit
    • Øyvind "pippin" Kolås's avatar
      app: cache fishes per operation instance in layer-modes · 4dd3e219
      Øyvind "pippin" Kolås authored
      There was a global 3x3 array of babl fishes used for converting between
      blending and compositing pixel representations, these were all hard-coded to
      operate within the sRGB babl-space family. This commit updates a per-instance
      array during operation prepare instead, that comes preconfigured with fishes
      derived from the correct space. Since the same operation instance might get
      different space input during its life time we store and compare the cached
      fishes with the current format (which is unique depending on space).
      
      This should address the problem seen in issue #2592
      4dd3e219
  4. 28 Nov, 2018 1 commit
    • Ell's avatar
      app: use gimp_tile_handler_validate_validate() in gimp:buffer-source-validate · 83dd94ba
      Ell authored
      Use gimp_tile_handler_validate_validate(), added in the commit
      before last, in gimp:buffer-source-validate, in order to pre-render
      the necessary region of the buffer, instead of performing the
      validation implicitly by iterating over the region.  This is both
      simpler, and, more importantly, allows us to render the entire
      region in a single chunk, instead of tile-by-tile, which can be
      considerably more efficient, especially with high thread counts.
      
      This essentially extends the dynamic sizing of rendered projection
      chunks to layer groups, which are rendered through
      gimp:buffer-source-validate, rather than just the main image
      projection.
      83dd94ba
  5. 01 Nov, 2018 1 commit
  6. 10 Sep, 2018 5 commits
  7. 09 Aug, 2018 1 commit
  8. 07 Aug, 2018 1 commit
  9. 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
  10. 14 Jul, 2018 1 commit
  11. 13 Jul, 2018 1 commit
  12. 12 Jul, 2018 1 commit
  13. 11 Jul, 2018 1 commit
  14. 08 Jul, 2018 1 commit
  15. 06 Jul, 2018 10 commits
  16. 20 Jun, 2018 1 commit
    • Ell's avatar
      Issue #1682 - Segfault when starting GIMP, due to empty data files · 993bbd35
      Ell authored
      Use gimp_input_data_stream_read_line_always(), instead of
      g_input_data_stream_read_line(), in a bunch of places that don't
      expect EOF.  If we don't do that, the code assumes the GError
      parameter is set by the function and returns an error indication,
      causing the caller to segfault when it tries to access
      error->message.  Instead, we now process an empty line when EOF is
      reached, which is caught by the normal parsing logic.
      
      Additionally:
      
        - Use gimp_ascii_strto[id]() when loading gradients, generated
          brushes, and palettes, to improve error checking for invalid
          numeric input.
      
        - Improve gradient-segment endpoint consistency check.
      
        - Allow loading palette files with 0 colors.  They can be created
          during the session, so we might as well successfully load them.
      993bbd35
  17. 26 May, 2018 1 commit
    • Ell's avatar
      Issue #1490 - Crash when flattening an XCF file · 367399e5
      Ell authored
      The default stack size for new threads on MacOS is 512 KiB, making
      our 512 KiB limit for stack-allocated buffers in
      gimp_operation_layer_mode_real_process() too high.  Lower it to
      256 KiB.
      367399e5
  18. 25 May, 2018 1 commit
  19. 13 May, 2018 1 commit
    • Ell's avatar
      app: in GimpOperationCageTransform, use sampler object ... · b7d95ad5
      Ell authored
      ... instead of gegl_buffer_sample()
      
      GEGL commit 26f13cbfe9aaaa8c176162e54fdbb8af6876538e got rid of the
      per-buffer cached samplers, making gegl_buffer_sample() much more
      expensive, suitable primarily for one-off samples.
      
      Use a sampler object instead.
      b7d95ad5
  20. 12 May, 2018 1 commit
  21. 07 May, 2018 1 commit
    • Ell's avatar
      app: add gimp_layer_mode_is_alpha_only() · 2c585981
      Ell authored
      ... which determines if a layer mode's blend function only affects
      the alpha, maintaining the backdrop's color.  This is currently
      true only for ERASE, SPLIT, and ANTI_ERASE modes.
      2c585981
  22. 26 Apr, 2018 2 commits
  23. 25 Apr, 2018 3 commits
    • luz.paz's avatar
      Bug 795557 - Misc. typo fixes in source, comments and doxygen (pt3) · 4a77ff2d
      luz.paz authored
      Found via `codespell` and grep.
      4a77ff2d
    • Ell's avatar
      app: use gradient cache for conical gradients · 5970046e
      Ell authored
      Add gimp_drawable_gradient_adjust_coords(), which adjusts the
      gradient segment coords according to the gradient type, so that, in
      cases where the gradient span is unrelated to the segment length,
      the gradient cache (in GimpOperationGradient) is big enough not to
      produce banding.  Use the new function in gimp_drawable_gradient()
      and in the gradient tool, instead of duplicating the logic.
      
      Move the shapreburst coordinate-adjustment logic to the new
      function, and add appropriate logic for conical gradients.
      
      Remove the code that avoids using the gradient cache for conical
      gradients from GimpOperationGradient.
      5970046e
    • Ell's avatar
      app: in GimpOperationGradient, move cache generation back to process() · 38ba45cf
      Ell authored
      Undo the part of commit fa9a4108
      that moved cache generation from process() to prepare().  prepare()
      is called after each property change, in order to calculate the
      op's bounding box for invalidation.  Since we only need the cache
      for actual processing, generating it in process() avoids that
      overhead.
      38ba45cf