Bug 345260

Summary: Some pictures are missing a small vertical line in the middle when zooming to "Fit".
Product: [Applications] gwenview Reporter: Martin Walch <walch.martin>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: REOPENED ---    
Severity: minor CC: myriam, nate, null
Priority: NOR    
Version First Reported In: Other (add details in bug description)   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: test case
screenshot of bad result

Description Martin Walch 2015-03-17 14:50:07 UTC
When using the "Fit" button, some pictures lack a small vertical stripe in the center (sometimes it is necessary to press it three times in a row to trigger the problem). The effect should become easily visible when setting zoom to "Fit" and then resizing the window.

Reproducible: Sometimes

Steps to Reproduce:
1. Open the test file in gwenview
2. Set zoom to "Fit"
3. Resize the window (height) while making sure that the gwenview window is too small to show the whole picture in original size.
Comment 1 Martin Walch 2015-03-17 14:50:39 UTC
Created attachment 91597 [details]
test case

A test case.
Comment 2 Martin Walch 2015-03-17 14:56:11 UTC
Created attachment 91598 [details]
screenshot of bad result

The above test case contains a vertical blue stripe and a vertical green stripe in the middle. The blue stripe is 1 pixel wide while the green stripe is 2 pixels wide.

However, as you can see in the screenshot, the 1px blue stripe stays clearly visible while the 2px green stripe vanishes almost completely.
Comment 3 Nate Graham 2017-11-10 17:35:05 UTC
Can't reproduce with Gwenview from git master. Please leave a comment if you can.
Comment 4 null 2017-11-11 09:47:15 UTC
I think this is still a problem. You can see this using KMag in "Selection Window Mode": Open the image with Fit zoom, point KMag to the line and change the vertical window size. You'll observe that Firefox does a much better job of downscaling than Gwenview, i.e. subsampling with less abrupt changes of color and a more uniform color distribution.

If I understand correctly, this is not so much about a missing line, but more about the scaling quality. Gwenview does compromise here on purpose to be fast, but in recent years Firefox may have found a way to be fast and precise. For real-world pictures this won't matter much probably, but if you are viewing images with thin lines (e.g. technical drawings or screenshots of a spreadsheet table, i.e. something ordinary users do who do not know about the advantages of vector formats), this can become a problem.