Krita Behind blending mode glitch fix
ClosedPublic

Authored by fazek on Feb 25 2016, 10:42 AM.

Details

Reviewers
dkazakov
woltherav
Group Reviewers
Krita
Summary

The Behind blending mode has a problem (at least) in 16 bit integer channel mode, probably because of mixing signed and unsigned integer calculations. The blended color turns into its inverse at near-transparent areas. This modified version works without this problem.

Test Plan

Open a canvas with 16 bits integer channels and draw on a transparent layer with some colors in the Behind drawing mode. It's best to use some blurred tool like the airbrush. If you cross a different color stroke, you can see inverse colors at the edges (Linux, x86_64).

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
fazek updated this revision to Diff 2464.Feb 25 2016, 10:42 AM
fazek retitled this revision from to Krita Behind blending mode glitch fix.
fazek updated this object.
fazek edited the test plan for this revision. (Show Details)
fazek added a reviewer: woltherav.
fazek set the repository for this revision to R37 Krita.
fazek added a subscriber: fazek.

This patch looks good to me, though I haven't been able to test it yet.

dmitry is a bit better in regards to the effect of the maths, so I am adding him as reviewer.

dkazakov accepted this revision.Feb 26 2016, 7:38 AM
dkazakov edited edge metadata.

Hi, @fazek!

Thank you for the patch! I tested it on int8, int16, float16 and float32 and it works fine. Now we can push it into master. Do you have KDE commit rights? Or I should push the patch for you? If the latter is true, I need your email address to keep your authorship over the commit :)

This revision is now accepted and ready to land.Feb 26 2016, 7:38 AM

@dkazakov Thanks. I don"t have the rights yet, so feel free to push it yourself.
I don't know what are the rules about email addresses in open text here, so I sent you an email with my address, I'm the same guy from the developer maillist who wants to add the CSV file format support.

woltherav accepted this revision.Feb 26 2016, 11:26 AM
woltherav edited edge metadata.

dmitry just pushed it! Congratulations on your first commit! (When you have 3 commits, we can get you contributor rights)

(Also, come say hi on irc)

fazek closed this revision.Feb 26 2016, 6:27 PM