GNOME Bugzilla – Bug 519503
Healing Tool - Sample Merged option does not work
Last modified: 2018-05-24 12:19:28 UTC
Please describe the problem: The "Sample Merged" option of the healing Tool does not work. It works just exactly as if the sample merged option weren't enabled. Just the actual layer is taken as the source for healing. Steps to reproduce: 1. create more than one layer 2. use healing tool with sample merged enabled on the uppermost layer 3. Actual results: only the uppermost layer is used for the sample Expected results: all layers are used for the sample Does this happen every time? yes Other information: I'm using WinGimp v2.4.4
What makes you think that it wouldn't work? It seems to work fine for me. Perhaps you can attach a small example image to illustrate the problem?
Created attachment 106491 [details] Try the healing tool with sample merged in the uppermost layer Try to heal the spots with sample merged in the uppermost layer.
The bug was classified to appear in all OS's. Since I'm using WinGimp I set it now to Windows. Maybe it's just a bug in the Windows version.
Yikes. I'm not even sure this is a bug -- it makes my head hurt just trying to figure out what the healing tool *ought* to do to a completely transparent layer using "sample merged". (I know what you expect it to do, Sam, but I'm not sure you ought to expect that.)
You can't "heal" something that doesn't exist. The Sample Merged option applies to the *source* of healing, not to the destination.
Maybe I didn't understand the tool correctly. I thought it would work as the healing brush tool of photoshop with the option sample all layers, which does work on empty layers. This way one can use the healing brush in a non destructive way which is very useful. Anyway, thanks for your quick responses.
Hm that is actually a damn good use case. Reopening so I don't forget about it, this might be pretty easy to implement... but I might just as well change my mind and close it again ;)
Today I stumbled upon the same thing. The manual suggests that it should work like in Photoshop just like sam described it in #6. So this is still present in Gimp 2.6
Hi all. I am very interested in this problem also. I am getting more heavily into professional fashion and beauty image retouching, and as a loyal GIMP user (and fan!) I experience the impossbility of healing towards a transparent layer often. Many online image retouching tutorials use the heal-to-transparent-layer technique to show a wide range of different effects, whether it be blemish banishing, skin cleaning, smoothing, etc. Maybe this isn't really a bug though, and those concerned (including myself) should get together to file a "feature request"? Thanks very much, and happy gimping all! :)
Created attachment 145616 [details] [review] proposed fix When 'sample merged' is selected, the region corresponding to the PDE's boundary condition need to be initialized from the whole projection. The attached patch contains also a fix for an obvious oversight. patch against app/paint/gimpheal.c of release 2.6.7
The obvious oversight has nothing to do with this bug, so I've committed it separately: commit f7ff0903ff9e87caadd70df6dece0bf2b9d88fdb Author: Sven Neumann <sven@gimp.org> Date: Fri Oct 16 22:06:34 2009 +0200 Fix a width/height confusion in the healing tool algorithm As pointed out by Massimo Valentini in bug #519503, the code used height where width should have been used. Correct. app/paint/gimpheal.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
That patch can't work because the clone tool already uses the paint core's orig_proj buffer for the clone *source*. We would have to introduce separate source and dest projection buffers in order to enable "sample merged" on both sides.
Review of attachment 145616 [details] [review]: Rejecting as per mitch' latest comment.
Maybe something for 2.10, clearly not for 2.6
Massimo, did you want to update your patch per Mitch's review for 2.10? Otherwise, I feel this feature should be bumped to 3.0 milestone.
In our current effort to get a 2.10 release, I am bumping this non-blocker report to 3.0 milestone. It can still make it to 2.10 if someone provides an updated patch before the release. Also with our new release policy, the feature will be allowed to be released in a minor 2.10.x version as well.
(In reply to Jehan from comment #15) > Massimo, did you want to update your patch per Mitch's review for 2.10? > Otherwise, I feel this feature should be bumped to 3.0 milestone. I'm not sure what Mitch intended. Was it there anything shared with the clone tool? How the tools work is always a little mysterious to me. Anyway a quick port to the new code is: diff --git a/app/paint/gimpheal.c b/app/paint/gimpheal.c index 71a9fd9313..f86e890172 100644 --- a/app/paint/gimpheal.c +++ b/app/paint/gimpheal.c @@ -563,16 +563,35 @@ gimp_heal_motion (GimpSourceCore *source_core, src_rect->width, src_rect->height)); - gegl_buffer_copy (gimp_drawable_get_buffer (drawable), - GEGL_RECTANGLE (paint_buffer_x, paint_buffer_y, - gegl_buffer_get_width (paint_buffer), - gegl_buffer_get_height (paint_buffer)), - GEGL_ABYSS_NONE, - paint_buffer, - GEGL_RECTANGLE (paint_area_offset_x, - paint_area_offset_y, - paint_area_width, - paint_area_height)); + if (GIMP_SOURCE_OPTIONS (paint_options)->sample_merged) + { + gint x = gimp_item_get_offset_x (GIMP_ITEM (drawable)); + gint y = gimp_item_get_offset_y (GIMP_ITEM (drawable)); + + gegl_buffer_copy (gimp_pickable_get_buffer (GIMP_PICKABLE (image)), + GEGL_RECTANGLE (x + paint_buffer_x, y + paint_buffer_y, + gegl_buffer_get_width (paint_buffer), + gegl_buffer_get_height (paint_buffer)), + GEGL_ABYSS_NONE, + paint_buffer, + GEGL_RECTANGLE (paint_area_offset_x, + paint_area_offset_y, + paint_area_width, + paint_area_height)); + } + else + { + gegl_buffer_copy (gimp_drawable_get_buffer (drawable), + GEGL_RECTANGLE (paint_buffer_x, paint_buffer_y, + gegl_buffer_get_width (paint_buffer), + gegl_buffer_get_height (paint_buffer)), + GEGL_ABYSS_NONE, + paint_buffer, + GEGL_RECTANGLE (paint_area_offset_x, + paint_area_offset_y, + paint_area_width, + paint_area_height)); + } mask_buffer = gimp_temp_buf_create_buffer ((GimpTempBuf *) mask_buf);
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/266.