Commit Graph

8 Commits

Author SHA1 Message Date
Ell
d3e1f50b13 app, meson.build: fix a bunch of warnings in C++ files
(cherry picked from commit 4fc345183b)
2019-09-12 20:05:45 +03:00
Ell
897426c4e1 app: in gimp_pickable_contiguous_region_by_seed(), add support for arbitrary buffer extents
(cherry picked from commit 99759a57e8)
2019-09-05 18:04:21 +03:00
dcc297b6f7 Issue #3224: Fill by Line Art Detection Bug (Fatal Error with Crash).
Typos in gimp_pickable_contiguous_region_by_line_art().
Thanks to Massimo for debugging these!

(cherry picked from commit 5d5ced88a8)
2019-04-12 14:50:25 +02:00
Ell
4eda127c52 Issue #3062 - Picking by hue using "Select by Color" goes awry ...
... in GIMP 2.10.9 from git

In gimppickable-contiguous-region's pixel_difference() function,
which is used, among other things, by the select-by-color and
fuzzy-select tools, when selecting by LCh/HSV hue, treat a pair of
colors as inifinitely far apart if one of them has positive chroma/
saturation, and the other has chroma/saturation that's very close
to 0; conversely, treat a pair of colors as equal if both of them
have chroma/sautation that's close to 0.

As a result, when the seed color is saturated, gray pixels are
never selected, while when the seed color is desaturated, all, and
only, gray pixels are selected.

(cherry picked from commit 9886b69dac)
2019-03-05 09:01:45 -05:00
07080d4540 app: improve line art filling when clicking on a line art closure.
When clicking on a line art pixel, only this pixel gets colored, which
is fine for actual (original) line art pixels. But on generated ones
(closure pixels, which are internal only), you end up with a single
pixel colored while the whole surrounding area is empty. This feels like
a bug (even though it was not one technically) as you have no way to
guess you are clicking on a closure pixel.
Instead, when this happens, simulate clicks on all neighbour pixels,
hence potentially coloring all surrounding regions, which is most likely
what you wanted.

(cherry picked from commit f310db6c21)
2019-03-04 19:01:44 +01:00
Ell
3f43c2ea12 Issue #1554 - Select by Color tool does not select pixel(s) or area(s) of pixel(s)
In gimp_pickable_contiguous_region_by_color(), add a small epsilon
to the threshold value, to allow for small errors due to the input
color and pickable pixel-colors being converted to the common
format through different paths.

While we *could* special-case threshold == 0 when the input color
comes from the same pickable, as is the case for the select-by-
color tool, and perform an exact comparison in the original format,
in the more general case the input color can come from an arbitrary
source, such as a plug-in.

(cherry picked from commit a6c79770c3)
2019-02-28 09:27:48 -05:00
Ell
61a6b15a66 app: parallelize gimp_pickable_contiguous_region_by_color()
... by distributing the processed area over multiple threads.

(cherry picked from commit 8571d7812f)
2019-01-17 09:30:51 -05:00
Ell
cfd1d0463f app: convert gimppickable-contiguous-region to C++
(cherry picked from commit 9719dff9c5)
2019-01-17 09:30:50 -05:00