Bug 340088 - 8 Bits to 16 Bits Float conversion causes pixelated glitches on the edges over transparent BG when OpenGL is ON
Summary: 8 Bits to 16 Bits Float conversion causes pixelated glitches on the edges ove...
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Usability (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-18 09:05 UTC by Tyson Tan
Modified: 2014-11-14 07:58 UTC (History)
1 user (show)

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


Attachments
When it glitches (170.04 KB, image/png)
2014-10-18 09:08 UTC, Tyson Tan
Details
A test file created as 8 Bits converted to 16 Bits (2.00 MB, application/x-krita)
2014-10-18 09:10 UTC, Tyson Tan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2014-10-18 09:05:49 UTC
After a 8 Bits document is converted into 16 Bits Float, save and re-open it when OpenGL is ON, you will see pixelated glitches around the edges over a transparent background, especially when zoomed OUT as much as possible. Editing the picture will not fix this. The new generated edges will glitch out as well. Changing Krita's Monitor profile from sRGB built-in to System Monitor Profile seems to turn the glitches from yellow to grey.

Doesn't happen on:
1) Very soft edges;
2) Pictures of 8 Bits per channel;
3) Pictures created as 16 Bit Float per channel natively;
4) Pictures converted to 16 Bits Float per channel, with background not 100% transparent, 1% white (99% transparency) works fine;
5) When zoomed in more than 200%, you cannot see the glitches anymore;
6) When OpenGL is OFF
7) Immediately when a 8 Bits picture is converted into 16 Bits (it glitches next time you open it)

Reproducible: Always

Steps to Reproduce:
1. Create a new document, A4 (300dpi) / RGB / 8 Bits / sRGB
2. Turn white background layer invisible
3. On the layer above, use Elliptical Selection tool to make a very large selection, then fill it with pure green
4. Menu > Image > Convert Image Color Space > Depth = 16 Bits Float, LCMS optimization does not matter
5. Save and close Krita
6. Open the saved file
7. Zoom OUT to max and you will see yellow pixelated glitches around the edges over transparent background.

Actual Results:  
8 Bits to 16 Bits Float conversion causes pixelated glitches on the edges over transparent BG when OpenGL is ON

Expected Results:  
8 Bits to 16 Bits Float conversion does not cause pixelated glitches on the edges over transparent BG when OpenGL is ON
Comment 1 Tyson Tan 2014-10-18 09:08:13 UTC
Created attachment 89185 [details]
When it glitches
Comment 2 Tyson Tan 2014-10-18 09:10:04 UTC
Created attachment 89186 [details]
A test file created as 8 Bits converted to 16 Bits
Comment 3 Tyson Tan 2014-10-18 09:15:57 UTC
Workaround:
1) Insert a white layer as background;
2) Set its layer transparency to 1.
This is as close as you can get to a 100% transparent background.
Comment 4 Halla Rempt 2014-11-05 10:57:41 UTC
The yellow or gray issue is because of the color correction -- it probably means that the monitor profile gives a better result. As for the glitches, I'm not sure what to think of it. Anti-aliased borders always consist of more or less transparent pixels, and going from 8 bit integer to 16 bit float won't add interpolation to make the image smoother -- and then it needs to be converted back to 8 bit integer for display, and in the process it's likely that there are rounding errors somewhere. I'm not sure the rounding errors are avoidable: they are likely to happen in the lcms conversion code.
Comment 5 Tyson Tan 2014-11-05 12:28:11 UTC
@Boud
I think I understand now. I will look into this in the future to see if there is any way around it. Thanks!
Comment 6 Tyson Tan 2014-11-14 07:58:50 UTC
Workaround can be found at: Bug 340947