Bug 471350

Summary: Cross-Channel filter uses Blue instead of Red
Product: [Applications] krita Reporter: IPv6 <razinkov>
Component: Filter LayersAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: KRA file with error
screen record

Description IPv6 2023-06-22 17:51:02 UTC
Created attachment 159838 [details]
KRA file with error

SUMMARY
***

I trying to make layer transparent based on RGB channel. So i set Alpha-driven-from-RED channel curve. But filter actually uses BLUE channel value to drive alpha.

***

STEPS TO REPRODUCE
1. Open attached KRA file
2. Open Cross-channel mask filter and alter channels

OBSERVED RESULT
Alpha drived by improper channel

EXPECTED RESULT
Alpha drived by proper channel

SOFTWARE/OS VERSIONS
Krita

 Version: 5.2.0-prealpha (git 6d578e3)
 Hidpi: true

Qt

  Version (compiled): 5.15.7
  Version (loaded): 5.15.7

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: darwin
  Kernel Version: 22.5.0
  Pretty Productname: macOS 13.4
  Product Type: osx
  Product Version: 13.4
Comment 1 IPv6 2023-06-22 18:04:47 UTC
To clarify: the problem is in Cross-channel mask filter behaviour (sorry, first time filling bug here...)
Added video recording with bug (480p due ile limit)
Comment 2 IPv6 2023-06-22 18:05:20 UTC
Created attachment 159839 [details]
screen record
Comment 3 Dmitry Kazakov 2023-07-21 07:24:18 UTC
Git commit 3e2ef5a19a24dc59e6ebc896125d50ae4c023f13 by Dmitry Kazakov.
Committed on 21/07/2023 at 07:23.
Pushed by dkazakov into branch 'master'.

Fix cross-channel filter preview to update when driver channel is changed

M  +1    -0    plugins/filters/colorsfilters/kis_cross_channel_filter.cpp

https://invent.kde.org/graphics/krita/-/commit/3e2ef5a19a24dc59e6ebc896125d50ae4c023f13
Comment 4 Dmitry Kazakov 2023-07-21 07:24:26 UTC
Git commit e33dc4d4f36bcb6e5a2794244ff29123b92ca1ac by Dmitry Kazakov.
Committed on 21/07/2023 at 07:23.
Pushed by dkazakov into branch 'master'.

Fix BGRB->RGBA flip in cross-channel filter

The HSV-curve adjustment should be aware of the color spaces, which
may have the channels flipped.

M  +3    -3    plugins/color/colorspaceextensions/kis_hsv_adjustment.cpp
M  +3    -3    plugins/color/colorspaceextensions/kis_hsv_adjustment.h

https://invent.kde.org/graphics/krita/-/commit/e33dc4d4f36bcb6e5a2794244ff29123b92ca1ac