Bug 413629 - Sometimes left and right margins of full-size preview image sheets are too large and image is too small
Summary: Sometimes left and right margins of full-size preview image sheets are too la...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.17.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-30 13:43 UTC by Gerhard Dittes
Modified: 2020-01-21 14:56 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.18.0
g-a-d: Usability+


Attachments
Good looking thumbnail, but tiny and unsharp image when clicked/"opened" finally (267.58 KB, image/png)
2019-10-30 13:46 UTC, Gerhard Dittes
Details
Insane margins (especially the left and right one) (296.05 KB, image/png)
2019-10-30 13:46 UTC, Gerhard Dittes
Details
Insane (tiny) size compared to thumbnail (467.64 KB, image/png)
2019-10-30 13:47 UTC, Gerhard Dittes
Details
Pretty unsharp (435.46 KB, image/png)
2019-10-30 13:48 UTC, Gerhard Dittes
Details
Better make the thumbnail not clickable... ;-) (366.10 KB, image/png)
2019-10-30 13:50 UTC, Gerhard Dittes
Details
BitWarden app on Flathub (184.48 KB, image/png)
2019-10-30 16:34 UTC, Nate Graham
Details
Discover produces empty space for "non-existent/transparent" images (1.45 MB, image/png)
2019-11-04 16:24 UTC, Gerhard Dittes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Dittes 2019-10-30 13:43:13 UTC
SUMMARY

The images which are finally shown when you click on the thumbnails, are quite often of pretty bad quality (although the actual (unmodified) images look quite fine). Further, sometimes the margins of the images have insane/incomprehensible sizes.

It's a pity as IMHO the user experience suffers a lot because of this...


STEPS TO REPRODUCE

Just use Discover and search for sth. (eg. KDocker).


SOFTWARE/OS VERSIONS

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.17.80
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.1
Kernel Version: 5.0.0-32-generic
OS Type: 64-bit


ADDITIONAL INFORMATION

I'm gonna upload some screenshots to show some of the mentioned issues...
Comment 1 Gerhard Dittes 2019-10-30 13:46:01 UTC
Created attachment 123590 [details]
Good looking thumbnail, but tiny and unsharp image when clicked/"opened" finally
Comment 2 Gerhard Dittes 2019-10-30 13:46:45 UTC
Created attachment 123591 [details]
Insane margins (especially the left and right one)
Comment 3 Gerhard Dittes 2019-10-30 13:47:46 UTC
Created attachment 123592 [details]
Insane (tiny) size compared to thumbnail
Comment 4 Gerhard Dittes 2019-10-30 13:48:08 UTC
Created attachment 123593 [details]
Pretty unsharp
Comment 5 Gerhard Dittes 2019-10-30 13:50:11 UTC
Created attachment 123594 [details]
Better make the thumbnail not clickable... ;-)
Comment 6 Gerhard Dittes 2019-10-30 13:55:15 UTC
FWIW, the mentioned issues are valid for (most likely all) previous versions of Plasma, too.

Regards, Gerhard (aka Gerardo)
Comment 7 Nate Graham 2019-10-30 14:00:16 UTC
I can reproduce the occasional issues with inappropriately large margins on the left and right side. However the other issues you describe where the full-size image is worse than the preview are the fault of the distro packaging, which defines these images. I'm using openSUSE Tumbleweed and I don't see any of these issues. The thumbnails are small, and the full-sized images are nice and big and sharp.

Let's keep this bug report for fixing the margins. Please report the issue about the small and fuzzy full-sized images to Neon (the neon product on https://bugs.kde.org). Thanks!
Comment 8 Gerhard Dittes 2019-10-30 14:22:41 UTC
@Nate: Thanks for your information. The distro-thing is really a pity, as I actually use Debian stable/testing (where I experience the same issues, too). I guess, that all Debian derivatives suffer from the same circumstance...
Comment 9 Nate Graham 2019-10-30 15:08:22 UTC
Yeah that would make sense if you see this problem in Debian too. Neon is inhering Ubuntu's stuff, which is inheriting Debian. Best fix it there, then.

You may want to work with Matthias Klumpp (CCd) who is the Debian Discover packager and author and maintainer of Appstream, the spec that defines how these screenshots are presented.
Comment 10 Nate Graham 2019-10-30 16:34:52 UTC
Created attachment 123598 [details]
BitWarden app on Flathub

An easily reproducible case is the BitWarden app available on Flathub. Its screenshot exhibits excessive side margins and is also quite a bit smaller than the actual image file [1] specified in the AppStream metadata [2]. In fact all the thumbnails that are too small or blurry seem to have these excessive side margins...

[1] https://camo.githubusercontent.com/efc3b807d82fd8eaf35375f5f2600414c17813c6/687474703a2f2f696d6775722e636f6d2f6f504d343479302e706e67
[2] https://github.com/flathub/com.bitwarden.desktop/blob/master/com.bitwarden.desktop.appdata.xml
Comment 11 Nate Graham 2019-10-30 16:42:32 UTC
ScreenshotsModel.cpp seems to be downloading a small version of https://camo.githubusercontent.com/efc3b807d82fd8eaf35375f5f2600414c17813c6/687474703a2f2f696d6775722e636f6d2f6f504d343479302e706e67. Odd.
Comment 12 Gerhard Dittes 2019-11-04 16:12:50 UTC
Hi, as suggested, I've meanwhile filed a corresponding bug in Debian (to potentially tackle one of the mentioned problems there):

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944117
Comment 13 Gerhard Dittes 2019-11-04 16:24:21 UTC
Created attachment 123717 [details]
Discover produces empty space for "non-existent/transparent" images
Comment 14 Gerhard Dittes 2019-11-04 16:24:33 UTC
@Nate: Inspired by you, I did some tests on Tumbleweed, too. There (as well as on other distributions) I've found another related issue:

Sometimes Discover reserves space for thumbnails even though no image is shown finally. Looks pretty untidy. Please see newly attached screenshot (showing entry for virtualbox).

(Could we tackle this problem here, too?) Thx!
Comment 15 Nate Graham 2019-11-04 17:28:04 UTC
The AppStream info for Virtualbox in Tumbleweed does in fact define a screenshot (https://www.virtualbox.org/attachment/wiki/Screenshots/OpenSuse13.2_on_Windows_7.png). Running discover from the CLI reveals the following error:

qrc:/qml/ApplicationScreenshots.qml:149:17: QML Image: Error decoding: https://www.virtualbox.org/attachment/wiki/Screenshots/OpenSuse13.2_on_Windows_7.png: Unsupported image format

The URL, despite its filename extension, leads to a web page and not to the actual image itself. The actual URL for the image is https://www.virtualbox.org/raw-attachment/wiki/Screenshots/OpenSuse13.2_on_Windows_7.png

This is an openSUSE issue.

However Discover should probably not display any screenshots section at all for images that have invalid URLs. Let's track that with Bug 413812.
Comment 16 Aleix Pol 2019-12-02 18:17:41 UTC
Git commit 05085877bc3d70b13ebc2d4bfa104da54e48a655 by Aleix Pol.
Committed on 02/12/2019 at 18:07.
Pushed by apol into branch 'Plasma/5.17'.

Account for weirdly horizontal screenshots

M  +4    -2    discover/qml/ApplicationScreenshots.qml

https://commits.kde.org/discover/05085877bc3d70b13ebc2d4bfa104da54e48a655
Comment 17 Aleix Pol 2019-12-02 18:17:41 UTC
Git commit 4d8d007f6eef847267d917c0f6d889b51a1aebaf by Aleix Pol.
Committed on 02/12/2019 at 18:17.
Pushed by apol into branch 'Plasma/5.17'.

Account for padding in the height of the screenshot popup

M  +1    -1    discover/qml/ApplicationScreenshots.qml

https://commits.kde.org/discover/4d8d007f6eef847267d917c0f6d889b51a1aebaf
Comment 18 Nate Graham 2020-01-21 14:56:25 UTC
Final issue fixed by https://cgit.kde.org/discover.git/commit/?id=22e39b6f14d63a10bae1bb0aa105b6455849781f (turned out to be a Discover issue after all).

Speed of browsing screenshots is also improved.