Bug 379507

Summary: Images show artifacts when scaled (OpenGL mode)
Product: [Applications] gwenview Reporter: Eugene Shalygin <eugene.shalygin+bugzilla.kde>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: justin.zobel, myriam
Priority: NOR    
Version First Reported In: Git (add output of "git log -1 --oneline" to description)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Original screenshot
Cropped in gimp
Cropped in Gwenview
screenshot of screenshot in Gwenview
screenshot of screenshot in Gwenview

Description Eugene Shalygin 2017-05-04 13:20:33 UTC
7a24b878 Merge remote-tracking branch 'origin/Applications/17.04'

When cropping scaled images, result image is distorted.

Steps to reproduce:

1. Take screenshot of a window with text, preferably with sub-pixel hinting enabled.
2. Open the screenshot in Gwenview, resize Gwenview window to make it smaller than scree, change view mode to "Fit".
3. Crop image.
4. See results in 100%.

Actual results: text rendering is distorted.

When cropping in "100%" scale mode, the image is not distorted.

Attaching a sample screenshot and results of resizing in GIMP and Gwenview.
Comment 1 Eugene Shalygin 2017-05-04 13:20:56 UTC
Created attachment 105339 [details]
Original screenshot
Comment 2 Eugene Shalygin 2017-05-04 13:21:19 UTC
Created attachment 105340 [details]
Cropped in gimp
Comment 3 Eugene Shalygin 2017-05-04 13:21:42 UTC
Created attachment 105341 [details]
Cropped in Gwenview
Comment 4 Christoph Feck 2017-05-12 14:54:44 UTC
This only affects the display, not the saved file. I actually had to follow your steps to see the bug, because the files you attached show no error.
Comment 5 Eugene Shalygin 2017-05-12 15:03:10 UTC
(In reply to Christoph Feck from comment #4)
> This only affects the display, not the saved file. 
Can not agree with you: when I view the saved file using Gwenview, text is colourised, when I view the file from GIMP, the text is normal.

> I actually had to follow your steps to see the bug, because the files you attached show no error.

Yes, when viewing the attachment in browser, I also see normal text. Don't know how to explain this.
Comment 6 Eugene Shalygin 2017-05-12 15:23:38 UTC
Created attachment 105484 [details]
screenshot of screenshot in Gwenview

Screenshot of Gwenview viewing the downloaded file.
Comment 7 Christoph Feck 2017-05-12 16:39:52 UTC
I guess you added the wrong screenshot...
Comment 8 Eugene Shalygin 2017-05-12 17:16:49 UTC
> I guess you added the wrong screenshot...
I downloaded it back for the last screenshot, so this explanation does not help.
Comment 9 Eugene Shalygin 2017-05-12 17:51:26 UTC
Created attachment 105487 [details]
screenshot of screenshot in Gwenview
Comment 10 Eugene Shalygin 2017-05-12 17:52:36 UTC
(In reply to Christoph Feck from comment #7)
> I guess you added the wrong screenshot...

Corrected. Sorry, I thought that you propose an explanation to why does browser show text without glitches.
Comment 11 Christoph Feck 2017-05-12 19:55:09 UTC
Can you confirm that changing the Image View setting from "OpenGL" to "Software" fixes this issue?
Comment 12 Eugene Shalygin 2017-05-12 19:56:14 UTC
Yes.