Bug 399169 - color picker doesn't sample alpha correctly
Summary: color picker doesn't sample alpha correctly
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: 4.1.3
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Emmet O'Neill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-28 07:55 UTC by voontrag
Modified: 2018-10-10 09:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Rar archive of the Krita Image file, the exported PNG—with the issue, and a desktop screen capture (of Krita) without the issue. (657 bytes, text/plain)
2018-09-28 07:55 UTC, voontrag
Details
Re-Upload of the originally intended attachment——now includes the image files as intended. (2.27 MB, application/x-rar)
2018-09-29 00:53 UTC, voontrag
Details

Note You need to log in before you can comment on or make changes to this bug.
Description voontrag 2018-09-28 07:55:18 UTC
Created attachment 115288 [details]
Rar archive of the Krita Image file, the exported PNG—with the issue, and a desktop screen capture (of Krita) without the issue.

SUMMARY


STEPS TO REPRODUCE
1. unavailable: Realized only after a completed illustration.
2. 
3. 

OBSERVED RESULT
Jagged dark line through my illustration, seen only in exported image files.

EXPECTED RESULT
Identical image (un-marred) as the one displayed in Krita.

_____
Visual [image damaging] artifact seen in the saved image that is not seen in Krita itself, but it IS seen in the exported BMP,PNG,PSD, and presumably other formats.

SOFTWARE VERSIONS
Krita
  Version: 4.1.3 (git 90852da)

Qt
  Version (compiled): 5.9.3
  Version (loaded): 5.9.3

OS Information
  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 6.1.7601
  Pretty Productname: Windows 7 SP 1 (6.1)
  Product Type: windows
  Product Version: 7sp1

OpenGL Info
  **OpenGL not initialized**

ADDITIONAL INFORMATION
This image was drawn in Krita, then saved as a KRA file, then a PNG (,and later a PSD, BMP, and TGA).  The exported files all have 

a jagged black line around the center eye-ball in the illustration. This does not show up in Krita, and does not show up in a desktop 

screen capture of the Krita window, but it is in every exported image that I saved with Krita. This is Krita saving damaged imagery; I 

would have to fix this in Photoshop before I could have a decent copy of the image—other than viewing it in Krita.

Krita is such a wonderful illustration tool, I really hope that this can be identified (and is fixable) with what I have sent. 

Isaac
Comment 1 Halla Rempt 2018-09-28 08:32:45 UTC
I'm sorry, but your attachment is a text file containing your message, not the actual images.
Comment 2 voontrag 2018-09-29 00:53:12 UTC
Created attachment 115302 [details]
Re-Upload of the originally intended attachment——now includes the image files as intended.
Comment 3 Halla Rempt 2018-10-01 11:52:07 UTC
The jagged line actually is present in the bottom-most layer. It looks like  transparency checkers, but it is actual pixel data, and the color picker doesn't say it's transparent... But if I export that layer to a png image and check in another application, it definitely is transparent. It looks like Krita's color picker has a problem with semi-transparent pixels on the bottom-most layer.

The next layer also isn't fully opaque. If I zoom in enough I can actually make out those pixels. The rest of the layers do not cover this area. So, there is a transparent line which isn't shown on canvas, but is shown when exporting. I suspect that this is actually a bug in the way the image is displayed on canvas, and that the export is correct -- because both export and canvas use the same projection.
Comment 4 Halla Rempt 2018-10-01 11:54:00 UTC
Btw, until we figure out the bug, I'd export to png with transparency disabled and white as the transparency fill color. Or get rid of the transparent pixels in the bottom layer, of course.
Comment 5 Halla Rempt 2018-10-01 11:56:17 UTC
I checked the exported png with gimp, and the jagged line pixels really are transparent in the exported file, so that _is_ correct. It's Krita's color picker and canvas that show some problems.
Comment 6 Halla Rempt 2018-10-01 11:59:26 UTC
Oh, for the canvas... That's accidental. The transparency checkers very neatly have the same-ish color as your image in those places. If you make the checkers bright purple, or black, Krita will show the problem as well.

Remains the question why the color picker doesn't register the pixels being semi transparent.
Comment 7 Emmet O'Neill 2018-10-07 16:25:07 UTC
Git commit 4976def25dc7e744acc34371473a61aa55070ae4 by Emmet O'Neill.
Committed on 07/10/2018 at 16:18.
Pushed by emmetoneill into branch 'master'.

Color picker now correctly picks alpha values.

M  +0    -1    libs/ui/tool/kis_tool_utils.cpp
M  +1    -1    libs/ui/tool/kis_tool_utils.h
M  +3    -4    libs/ui/tool/strokes/kis_color_picker_stroke_strategy.cpp
M  +2    -2    plugins/tools/basictools/kis_tool_colorpicker.cc

https://commits.kde.org/krita/4976def25dc7e744acc34371473a61aa55070ae4
Comment 8 Halla Rempt 2018-10-10 09:57:45 UTC
Git commit a570dae50e39836e2e9e5dd8e22cee2ba629bafe by Boudewijn Rempt, on behalf of Emmet O'Neill.
Committed on 10/10/2018 at 07:40.
Pushed by rempt into branch 'krita/4.1'.

Color picker now correctly picks alpha values.
(cherry picked from commit 4976def25dc7e744acc34371473a61aa55070ae4)

M  +0    -1    libs/ui/tool/kis_tool_utils.cpp
M  +1    -1    libs/ui/tool/kis_tool_utils.h
M  +3    -4    libs/ui/tool/strokes/kis_color_picker_stroke_strategy.cpp
M  +2    -2    plugins/tools/basictools/kis_tool_colorpicker.cc

https://commits.kde.org/krita/a570dae50e39836e2e9e5dd8e22cee2ba629bafe