Bug 369327 - User photo/avatar doesn't support antialias
Summary: User photo/avatar doesn't support antialias
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: 5.5.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-25 13:09 UTC by Guo Yunhe
Modified: 2018-05-03 09:37 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of user photo/avatar in application launcher (18.08 KB, image/png)
2016-09-25 13:10 UTC, Guo Yunhe
Details
My user avatar photo (52.99 KB, image/jpeg)
2016-09-26 18:19 UTC, Guo Yunhe
Details
Screenshot compare user profile dialog and a dialog I created (19.59 KB, image/png)
2016-09-26 18:32 UTC, Guo Yunhe
Details
Screenshot compare application launcher and a dialog I created (16.96 KB, image/png)
2016-09-26 18:39 UTC, Guo Yunhe
Details
avatar in kicker, plasma 5.12.4 (100.36 KB, image/png)
2018-04-04 16:10 UTC, Patrick Silva
Details
avatar in user manager, plasma 5.12.4 (40.78 KB, image/png)
2018-04-04 16:11 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guo Yunhe 2016-09-25 13:09:51 UTC
The user photo/avatar in application launcher, SDDM login screen and lock screen has obvious no antialiasing. This make photos and drawings render in a bad result.

See screenshot attachment.

Reproducible: Always

Steps to Reproduce:
1. Set a user profile photo.
2. Open application launcher. Look at the user photo in launcher.
3. Lock the screen. Look at the user photo in lock screen.
4. Logout. Look at the user photo in login screen.
Comment 1 Guo Yunhe 2016-09-25 13:10:41 UTC
Created attachment 101282 [details]
Screenshot of user photo/avatar in application launcher
Comment 2 Marco Martin 2016-09-26 15:24:47 UTC
the item is just an Image, which has smooth: true.
is the avatar icon stored pre-scaled?
Comment 3 Guo Yunhe 2016-09-26 18:19:09 UTC
(In reply to Marco Martin from comment #2)
> the item is just an Image, which has smooth: true.
> is the avatar icon stored pre-scaled?

Not pre-scaled, it is a large JPEG picture 600x600px.
Comment 4 Guo Yunhe 2016-09-26 18:19:47 UTC
Created attachment 101302 [details]
My user avatar photo
Comment 5 Guo Yunhe 2016-09-26 18:32:22 UTC
Created attachment 101303 [details]
Screenshot compare user profile dialog and a dialog I created

The left avatar is in the KDE user management. The right avatar is in a dialog I created in Qt Designer. They use the same picture and same size.

I can see that the left one is not as smooth as the right one. When you scale the screenshot 2 times bigger, the difference is more visiable.
Comment 6 Guo Yunhe 2016-09-26 18:39:33 UTC
Created attachment 101304 [details]
Screenshot compare application launcher and a dialog I created
Comment 7 Alexander Mentyu 2017-08-27 16:28:05 UTC
Can confirm this bug in:

Distribution: KDE neon Developer Edition Unstable Branches
KDE Plasma Version: 5.10.90
KDE Frameworks Version: 5.37.0
Qt Version: 5.9.1
Kernel Version: 4.10.0-32-generic

Noticed that antialiasing isn't used for newly chosen image after pressing 'Apply' button in 'User Manager' settings window - before pressing Apply - antialiasing is used for new image - maybe resizing of image after applying?
Comment 8 Alexander Mentyu 2017-08-27 16:35:30 UTC
Antialiasing isn't used in 'User Manager' settings window itself - but antialiasing is used for Login Screen, Lock Screen and Leave dialog windows image.
Comment 9 Patrick Silva 2018-04-04 16:10:55 UTC
Created attachment 111824 [details]
avatar in kicker, plasma 5.12.4

I use plasma 5.12.4 on Arch Linux.
My avatar looks fuzzy in kicker and user manager (see screenshots).
It looks good in SDDM, logout screen and lock screen.
Comment 10 Patrick Silva 2018-04-04 16:11:30 UTC
Created attachment 111825 [details]
avatar in user manager, plasma 5.12.4
Comment 11 David Edmundson 2018-05-02 14:43:39 UTC
Git commit 9da4da7ea7f71dcf6da2b6b263f7a636029c4a25 by David Edmundson, on behalf of Kirill Tatunov.
Committed on 02/05/2018 at 14:43.
Pushed by davidedmundson into branch 'Plasma/5.12'.

Fix avatar picture aliasing and stretching in kickoff

Summary:
QML Image element has some smoothing when scaling an image by default but it's not enough and the picture still looks a bit pixelated. This patch fixes that.
Also while I was at it, I added keeping the aspect ratio, because no one likes their avatars stretched.

Test Plan:
Before: {F5819424} {F5819425}
After: {F5819429} {F5819430}

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D12469

M  +5    -0    applets/kickoff/package/contents/ui/Header.qml

https://commits.kde.org/plasma-desktop/9da4da7ea7f71dcf6da2b6b263f7a636029c4a25
Comment 12 Guo Yunhe 2018-05-03 09:37:49 UTC
Thanks for the fix!