1. 27 Nov, 2018 1 commit
    • Jehan's avatar
      app: radius map actually not useful during smart colorization grow step. · 6bec0bc8
      Jehan authored
      The distance map has all the information we need already. Also we will
      actually grow up to the max radius pixel (middle pixel of a stroke).
      After discussing with Aryeom, we realized it was better to fill a stroke
      fully (for cases of overflowing, I already added the "Maximum growing
      size" property anyway).
      6bec0bc8
  2. 26 Nov, 2018 1 commit
  3. 22 Nov, 2018 2 commits
    • Jehan's avatar
      app: add "line-art-max-grow" property to the bucket fill options. · eb042e6c
      Jehan authored
      When flooding the line art, we may overflood it in sample merge (which
      would use color in the line art computation). And if having all colors
      on the same layer, this would go over other colors (making the wrong
      impression that the line art leaked).
      This new option is mostly to keep some control over the mask growth.
      Usually a few pixels is enough for most styles of drawing (though we
      could technically allow for very wide strokes).
      eb042e6c
    • Jehan's avatar
      app: replace gegl:watershed-transform with custom algorithm. · 3467acf0
      Jehan authored
      We don't really need to flow every line art pixel and this new
      implementation is simpler (because we don't actually need over-featured
      watershedding), and a lot lot faster, making the line art bucket fill
      now very reactive.
      For this, I am keeping the computed distance map, as well as local
      thickness map around to be used when flooding the line art pixels
      (basically I try to flood half the stroke thickness).
      
      Note that there are still some issues with this new implementation as it
      doesn't properly flood yet created (i.e. invisible) splines and
      segments, and in particular the ones between 2 colored sections. I am
      going to fix this next.
      3467acf0
  4. 19 Nov, 2018 1 commit
  5. 14 Nov, 2018 2 commits
    • Jehan's avatar
      app: edit the bucket fill tool options with new line art options. · 824af124
      Jehan authored
      I have not added all the options for this new tool yet, but this sets
      the base. I also added a bit of TODO for several places where we need to
      make it settable, in particular the fuzzy select tool, but also simply
      PDB calls (this will need to be a PDB context settings.
      
      Maybe also I will want to make some LineArtOptions struct in order not
      to have infinite list of parameters to functions. And at some point, it
      may also be worth splitting a bit process with other type of
      selection/fill (since they barely share any settings anyway).
      
      Finally I take the opportunity to document a little more the parameters
      to gimp_lineart_close(), which can still be improved later (I should
      have documented these straight away when I re-implemented this all from
      G'Mic code, as I am a bit fuzzy on some details now and will need to
      re-understand code).
      824af124
    • Jehan's avatar
      app: compute line art in advance. · f246f404
      Jehan authored
      Right now, this is mostly meaningless as it is still done sequentially.
      But I am mostly preparing the field to pre-compute the line art as
      background thread.
      f246f404
  6. 20 Oct, 2018 1 commit
  7. 09 Aug, 2018 1 commit
  8. 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
  9. 17 Jul, 2018 1 commit
    • Ell's avatar
      app, pdb: add gimp-register-file-handler-priority procedure · b4ac9568
      Ell authored
      Add a gimp-register-file-handler-priority procedure, which can be
      used to set the priority of a file-handler procedure.  When more
      than one file-handler procedure matches a file, the procedure with
      the lowest priority is used; if more than one procedure has the
      lowest priority, it is unspecified which one of them is used.  The
      default priority of file-handler procedures is 0.
      
      Add the necessary plumbing (plus some fixes) to the plug-in manager
      to handle file-handler priorities.  In particular, use two
      different lists for each type of file-handler procedures: one meant
      for searching, and is sorted according to priority, and one meant
      for display, and is sorted alphabetically.
      b4ac9568
  10. 15 Jul, 2018 1 commit
  11. 14 Jul, 2018 2 commits
  12. 12 Jul, 2018 1 commit
    • Michael Natterer's avatar
      Issue #1834 - (gimp-context-get-gradient) could return a gradient name... · 397ae027
      Michael Natterer authored
      ...not found if language changed since last session
      
      For various reasons, (gimp-context-get-brush, pattern, gradient, ...)
      can return "Standard" which is the untranslatable name of the internal
      fallback object.
      
      Therefore, we must accept "Standard" as fallback in all PDB functions
      that take brush, pattern, gradient etc. names.
      397ae027
  13. 11 Jul, 2018 1 commit
  14. 06 Jul, 2018 1 commit
  15. 22 Jun, 2018 1 commit
  16. 05 Jun, 2018 1 commit
    • Jehan's avatar
      app: do not stop the measurement when straightening. · d56a8d43
      Jehan authored
      Instead just transform the measurement extremities appropriately to
      still map to the same points.
      To do so, I also added out parameters to gimp_image_resize_to_layers()
      so that calling code can get offsets from old origin (as well as new
      image dimensions).
      d56a8d43
  17. 02 Jun, 2018 1 commit
  18. 29 May, 2018 1 commit
    • Ell's avatar
      app, pdb: wait for fonts to load before dependent operations · f2134180
      Ell authored
      Use gimp_fonts_wait(), added in the previous commit, to wait for
      fonts to finish loading before operations that depend on font
      availability.  In particular, this includes font- and text-related
      PDB functions, and text-layer rendering.
      f2134180
  19. 27 May, 2018 1 commit
    • Jehan's avatar
      Issue #1211: Load fonts in background after startup. · 2484dec7
      Jehan authored
      Fonts should not be blocking startup as this provides a very bad
      experience when people have a lot of fonts. This was experienced even
      more on Windows where loading time are often excessively long.
      We were already running font loading in a thread, yet were still
      blocking startup (thread was only so that the loading status GUI could
      get updated as a feedback). Now we will only start loading and proceed
      directly to next steps.
      While fonts are not loaded, the text tool will not be usable, yet all
      other activities can be performed.
      2484dec7
  20. 20 May, 2018 3 commits
  21. 12 May, 2018 1 commit
  22. 07 May, 2018 2 commits
    • Michael Natterer's avatar
      app: add layers/channels/vectors freeze/thaw to gimpplugin-cleanup · 7e1df2c8
      Michael Natterer authored
      so plug-ins cannot thaw what they haven't frozen, and the code
      can clean up frozen stuff left behind by crashed or broken plug-ins.
      
      Also redo the cleanup code so it only keeps track of the undo group
      counts and freeze counts of what *this* GimpPlugInProcFrame did
      itself. That should make it even stricter against broken code that
      could mess up internals.
      7e1df2c8
    • Ell's avatar
      pdb: add gimp-image-{freeze,thaw}-{layers,channels,vectors} · 40e3406b
      Ell authored
      These procedures freeze/thaw the corresponding containers of the
      image, allowing plug-ins that perform many changes affecting any of
      these containers to suppress updates to the corresponding dialogs,
      significantly improving performance.
      40e3406b
  23. 01 May, 2018 1 commit
    • Jehan's avatar
      app: popup error at startup when some fonts fail to load. · e796e3a5
      Jehan authored
      As proposed on IRC. This will allow people to debug their fonts (for
      instance when there are permission issues or whatnot) by knowing the
      list of problematic fonts in an error dialog at startup (and not only on
      terminal).
      e796e3a5
  24. 25 Apr, 2018 1 commit
  25. 24 Apr, 2018 2 commits
  26. 23 Apr, 2018 4 commits
  27. 21 Apr, 2018 1 commit
  28. 20 Apr, 2018 2 commits
  29. 18 Apr, 2018 1 commit