Bug 321421

Summary: Drawing near the edge of locked alpha layer with smudge brush results in unwanted color behaviour.
Product: [Applications] krita Reporter: Bollebib <kwadraatnope>
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: animtim, halla, sven.langkamp
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Bollebib 2013-06-20 10:54:37 UTC
If you lock the alpha of a layer

->choose smudge brush that has high smudge rate (disable color rate for better results)
->paint from outside alpha to inside alpha 

=>Black gets dragged in from nowhere and gets added to the alpha.

This is IMO not wanted behaviour as you introduce a color that is not necessarily wanted for the painting. And since you can't influence it it will always be black,making you have to pay much attention when using alpha lock. 

The smudge brush ideally does not introduce a color that should not be there. if there is nothing to smudge...then don't smudge.
Comment 1 Halla Rempt 2013-06-21 08:02:00 UTC
Ack, I can reproduce.
Comment 2 animtim 2013-11-06 16:51:58 UTC
This issue is not exactly specific to "lock alpha".
You can reproduce on a not-locked canvas too:

-create new document
-add new layer
-hide background layer (so it's easier to see next steps..)
-on the new layer, draw a white area using a fully opaque preset (like fill_circle).
-select a smudge preset (like Smudge_block_tilt), and smudge the white area starting from outside to the inside.
-see the black added.
Comment 3 Dmitry Kazakov 2013-12-03 13:30:39 UTC
Git commit 8adefa2cc486ba82a6919edb812e4c63b5ba8e7b by Dmitry Kazakov.
Committed on 03/12/2013 at 13:29.
Pushed by dkazakov into branch 'master'.

Fix KoCompositeOpCopy2 to handle source alpha channel properly

The value of the source aplha should be taken into account while blending
two pixels. Otherwise black aerials appear on screen. This might not be
too mathematically correct, but at least something.

M  +7    -0    krita/benchmarks/kis_composition_benchmark.cpp
M  +2    -0    krita/benchmarks/kis_composition_benchmark.h
M  +12   -6    libs/pigment/compositeops/KoCompositeOpCopy2.h

http://commits.kde.org/calligra/8adefa2cc486ba82a6919edb812e4c63b5ba8e7b
Comment 4 Dmitry Kazakov 2013-12-19 05:43:26 UTC
Git commit f9d92a94dfb57fab07ed07fec7248f4914e99ba8 by Dmitry Kazakov.
Committed on 03/12/2013 at 13:29.
Pushed by dkazakov into branch 'calligra/2.8'.

Fix KoCompositeOpCopy2 to handle source alpha channel properly

The value of the source aplha should be taken into account while blending
two pixels. Otherwise black aerials appear on screen. This might not be
too mathematically correct, but at least something.

M  +7    -0    krita/benchmarks/kis_composition_benchmark.cpp
M  +2    -0    krita/benchmarks/kis_composition_benchmark.h
M  +12   -6    libs/pigment/compositeops/KoCompositeOpCopy2.h

http://commits.kde.org/calligra/f9d92a94dfb57fab07ed07fec7248f4914e99ba8