1. 19 Dec, 2018 9 commits
    • Jehan's avatar
      app: flood isolated pixels in smart colorization fill. · 439a44a6
      Jehan authored
      The smart colorization was leaving irritating single pixels in between
      colorized regions, after growing and combining. So let's just flood
      these. We don't flood bigger regions (and in particular don't use
      gimp_gegl_apply_flood()) on purpose, because there may be small yet
      actual regions inside regions which we'd want in other colors. 1-pixel
      regions is the extreme case where chances that one wanted it filled are
      just higher.
      (cherry picked from commit 744d6793)
    • Jehan's avatar
      app: radius map actually not useful during smart colorization grow step. · 4fe5dc5d
      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).
      (cherry picked from commit 6bec0bc8)
    • Jehan's avatar
      app: add possibility to antialias line art colorization. · c4988efd
      Jehan authored
      (cherry picked from commit d2f9549c)
    • Jehan's avatar
      app: add "line-art-max-grow" property to the bucket fill options. · b00580d4
      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).
      (cherry picked from commit eb042e6c)
    • Jehan's avatar
      app: replace gegl:watershed-transform with custom algorithm. · e5bea42b
      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.
      (cherry picked from commit 3467acf0)
    • Jehan's avatar
      app: remove now useless erosion size option. · 61558893
      Jehan authored
      Since commit b00037b8, erosion size is not used anymore, as this step
      has been removed, and the end point detection now uses local thickness
      of strokes instead.
      (cherry picked from commit 3f58a385)
    • Jehan's avatar
      app: edit the bucket fill tool options with new line art options. · 6b1d7969
      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).
      (cherry picked from commit 824af124)
    • Jehan's avatar
      app: bucket fill tool with a "paint-style" interaction. · 808cdc98
      Jehan authored
      Rather than just having a click interaction, let's allow to "paint" with
      the bucket fill. This is very useful for the new "line art" colorization
      since it tends to over-segment the drawing. Therefore being able to
      stroke through the canvas (rather than click, up, move, click, etc.)
      makes the process much simpler. This is also faster since we don't have
      to recompute the line art while a filling is in-progress.
      Note that this new behavior is not only for the line art mode, but also
      any other fill criterion, for which it can also be useful.
      Last change of behavior as a side effect: it is possible to cancel the
      tool changes the usual GIMP way (for instance by right clicking when
      releasing the mouse button).
      (cherry picked from commit e1c40506)
    • Jehan's avatar
      app: compute line art in advance. · 32f0a49e
      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.
      (cherry picked from commit f246f404)
  2. 22 Oct, 2018 1 commit
  3. 11 Jul, 2018 1 commit
  4. 25 Apr, 2018 1 commit
    • Ell's avatar
      app: use paint composite-mode, instead of AUTO, in more places · 45be8b25
      Ell authored
      In the various types of fill operations, and in fade operations,
      use the paint composite-mode of the current paint mode, which is
      the composite mode we use during painting, instead of AUTO, which
      results in the default mode we use for layer compositing.  This
      effectively means that filling using any non-legacy, non-
      subtractive mode can paint over transparent areas, rather than
      being limited to nontransparent areas.
  5. 12 Feb, 2017 1 commit
  6. 01 Feb, 2017 1 commit
  7. 16 Sep, 2016 1 commit
  8. 15 Sep, 2016 1 commit
  9. 30 Jun, 2016 2 commits
    • Ell's avatar
      app: add missing cleanup to the previous commit · f4e8cf29
      Ell authored
    • Ell's avatar
      app: eliminate double application of the selection mask ... · bd554439
      Ell authored
      ... in gimp_drawable_bucket_fill()
      gimp_drawable_apply_buffer() already takes the selection mask into
      account.  Intersecting the selection mask with the fill region
      prior to that leads to wrong (too low) alpha values, in general,
      when partial selection is involved.
      This commit eliminates the intersection of the fill region and
      selection mask data before the apply_buffer() call, although it
      does calculate the intersection of their bounds, to avoid
      processing regions that won't be visible anyway.
  10. 29 May, 2016 2 commits
  11. 11 Mar, 2016 2 commits
  12. 16 Jan, 2016 2 commits
    • Ell's avatar
      app: Add "Diagonal neighbors" option to the bucket fill tool · 350c7ca3
      Ell authored
      When checked, diagonally neighboring pixels are considered connected
      when calculating the affected area.
      This commit also adds a corresponding diagonal_neighbors parameter to
      gimp_drawable_bucket_fill(), and modifies the callers, other than the
      bucket fill tool, to pass FALSE for this parameter, to retain the
      current behavior.
    • Ell's avatar
      app: Add diagonal_neighbors parameter to... · 93bf78b8
      Ell authored
      ...gimp_pickable_contiguous_region_by_seed(), in preperation
      for adding a similar option to the relevant tools.
      When this parameter is TRUE, all eight neighbors of each pixel
      are considered when calculating the resulting region, instead
      of just the four orthogonal ones.
      This commit also modifies all callers to pass FALSE for this
      parameter, to retain the current behavior.
  13. 30 Sep, 2015 1 commit
    • Jehan's avatar
      app: save color history when a color is used. · 52f6a2ae
      Jehan authored
      Now the history of recently used colors is not updated when selecting
      in the color dialog anymore, but when a color is actually used.
      Tools supported right now are: Ink, MyPaint brush, all PaintBrush tools,
      bucket fill and eraser (background color on non-alpha drawables).
      Moreover from now on, colors already saved are properly moved to first
      position when reused.
  14. 03 Jun, 2014 2 commits
  15. 02 Jun, 2014 1 commit
  16. 31 May, 2014 1 commit
  17. 05 May, 2014 1 commit
  18. 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.
  19. 08 Apr, 2013 1 commit
  20. 31 Oct, 2012 1 commit
  21. 22 Oct, 2012 1 commit
  22. 20 May, 2012 1 commit
  23. 18 May, 2012 1 commit
  24. 03 May, 2012 1 commit
  25. 02 May, 2012 3 commits