GNOME Bugzilla – Bug 568098
Healing Tool doesn't work at the layer borders
Last modified: 2012-05-10 18:14:55 UTC
Please describe the problem: The Healing Tool does not work when your brush is partially outside the image. If a part of the brush is out of the image canvas, then the tool does not work. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 184900 [details] [review] 0001-Heal-Make-HealTool-work-when-brush-is-partially-outs.patch I wrote a patch for that bug: Removes condition for not applying heal when (destination)brush is partially outside of layer. Instead heal is not applied when brush is completely outside. I have removed the conditions which cancel healing when destination is partially outside of layer. In case the healing really needs to be canceled (when the source is outside) it gets canceled through one of the other conditions anyway, so my patch should not make anything worse. I also added a check which cancels healing when the destination is completely outside of layer.
Thanks for the patch. I am waiting for it since 2009-01-17
That patch is unfortunately completely broken. The result is complete noise, or almost no effect when painting partially off-image.
Review of attachment 184900 [details] [review]: needs-work as per mitch's comment
Problems this patch had seem to have been corrected by patch in bug 674543. Committed as provided. commit 8cd272bb8024886822185e9c39be276bf1c97a4e Author: Enrico Schröder <enni.schroeder@gmail.com> Date: Fri Apr 1 22:19:34 2011 +0200 Heal: Make HealTool work when brush is partially outside of layer Fix for bug 568098 https://bugzilla.gnome.org/show_bug.cgi?id=568098 Removes condition for not applying heal when (destination)brush is partially outside of layer. Instead heal is not applied when brush is completely outside.
This should be backed out. Sorry, I forgot to mention that there are issues to this patch other than that one specific issue of corruption - mainly that the code assumes the brush mask is the same size as the affected area, so gimp_heal_laplace_iteration is reading the wrong values from the mask when the brush is off the edge. You can test this if you use it w/ the pepper brush near the edge of an image.
I see... I don't think its big enough of a defect to warrant a revert tho. It causes the heal to not function perfectly at top/right edges. It's fine on the bottom.
reopening tho, as something that needs a little more attention.
Created attachment 213629 [details] [review] Fixes the wrong row stride at layer edges. Okay. Well, anyway here's a full fix for this bug. Patch is against master.
Could you do a patch against 2.8 branch as well?
Created attachment 213707 [details] [review] Patch against 2.8 branch. Sure. Here's a patch against 2.8. This one's a bit more complicated because I didn't have the GEGL rectangles to simply shift over a bit. Wound up passing a PixelRegion around for the mask.
Committed the master variant. Mitch is looking at the 2.8 patch. Thanks for great work:) commit 15a85744bad6b5c9d44946d7daa831f87ec620db Author: Michael Henning <mikehenning@eclipse.net> Date: Mon May 7 18:57:57 2012 -0400 app: Fix heal tool behavior at top and left edge (Bug 568098) Fixes calculation of the mask buffer's rectangle.
Fixed in 2.8: commit fa8a5a63ab42e8780bc3c379d50b2ac4e6a76463 Author: Michael Henning <mikehenning@eclipse.net> Date: Tue May 8 16:39:38 2012 -0400 Bug 568098 - Healing Tool doesn't work at the layer borders. Fixes the row stride for the brush mask. app/paint/gimpheal.c | 59 +++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 20 deletions(-)