Bug 424551 - Gamma error in picture scaling
Summary: Gamma error in picture scaling
Status: RESOLVED NOT A BUG
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.3.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-22 23:00 UTC by Lukas Frank
Modified: 2020-07-23 21:34 UTC (History)
2 users (show)

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


Attachments
Specially crafted image to demonstrate gamma error (82.90 KB, image/jpeg)
2020-07-22 23:00 UTC, Lukas Frank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Frank 2020-07-22 23:00:41 UTC
Created attachment 130324 [details]
Specially crafted image to demonstrate gamma error

SUMMARY
Resizing images produces a gamma error. This can clearly be demonstrated by resizing a specially crafted image. It affects all images and worsens the image quality by making them "darker".
A more in depth explanation and how to fix this problem can be found on the website http://www.ericbrasseur.org/gamma.html?i=1

STEPS TO REPRODUCE
1. Download "gamma_dalai_lama_gray.jpg" from the attachments
2. Open gamma_dalai_lama_gray.jpg with Krita
3. Proportionally resize the image by doing:
3.1 Image -> Resize Picture
3.2 Tick "Constrain Proportions" and Select "%"
3.3 Pick 50% for width and heigth
3.4 You can pick any one of the filters except Nearest Neighbour
3.5 Press OK

ALTERNATVE STEPS TO REPRODUCE
1. Step 1 and 2 as above
2. Scroll down the mouse wheel until the zoom factor is 50%

OBSERVED RESULT
The image comes out grey or grey with some barely visible outlines.

EXPECTED RESULT
Picture with natural colors.

SOFTWARE/OS VERSIONS
Archlinux with kernel 5.6.17
KDE Plasma: 
(available in About System)
KDE Plasma Version: plasma-desktop 5.19.3-1
KDE Frameworks Version: plasma-framework 5.72.0-1
Qt Version: qt5-base 5.15.0-4




ADDITIONAL INFORMATION

krita 4.3.0-1

amdgpu-core-meta 19.30_934563-1
xf86-video-amdgpu 19.1.0-2

mesa 20.1.3-1
lib32-mesa 20.1.3-1

libva 2.8.0-1
libva-mesa-driver 20.1.3-1
lib32-libva-mesa-driver 20.1.3-1

mesa-vdpau 20.1.3-1
lib32-mesa-vdpau 20.1.3-1
Comment 1 Christoph Feck 2020-07-23 07:57:17 UTC
Please don't set flags in bugzilla. They are used by developers.
Comment 2 Halla Rempt 2020-07-23 08:35:45 UTC
Oh, gods, not that old canard _again_. It's nonsense. Krita lets you do what you want: you just have to select the right linear gamma profile. We're not going to fake linear gamma if you don't select a linear gamma profile.
Comment 3 Lukas Frank 2020-07-23 21:34:14 UTC
Thank you for clearing my misunderstanding. I see that I can fix the "problem" with scrolling by selecting scRGB(linear) in display settings.

The gamma is also correct in resizing if I select scRGB(linear) as Color Profile for the picture. 

A quick way to change the colorspace of multiple images seems to be to go to Extras->Scripts->ColorSpace