Bug 344185 - Selected image gets pixelated instead of smooth when scaling is necessary
Summary: Selected image gets pixelated instead of smooth when scaling is necessary
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_useraccount (show other bugs)
Version: 5.2.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL: https://i.imgur.com/x7S5Pe7.jpg
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-15 09:44 UTC by Martin Häggström
Modified: 2015-02-16 15:46 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Häggström 2015-02-15 09:44:52 UTC
It seems that the module is not using Qt::SmoothTransformation when scaling the image down to 64x64 pixels.

Proposed change:
Line 122 in kdepasswd/kcm/chfacedlg.cpp ought to be changed to 
pix = pix.scaled( KCFGUserAccount::faceSize(), KCFGUserAccount::faceSize(), Qt::KeepAspectRatio, Qt::SmoothTransformation );

Reproducible: Always

Steps to Reproduce:
1. Open user account kcm module ("kcmshell kcm_useraccount")
2. Click on face icon to change it
3. Click "Custom Image" and select an image larger than 64x64 px (default size)

Actual Results:  
The displayed image in the grid is very pixelated / hard to distinguish.

Expected Results:  
The displayed image in the grid should be a smoothly scaled down version of the selected image.
Comment 1 Kai Uwe Broulik 2015-02-16 15:46:57 UTC
Git commit 1d4eb597c573caa7bf28dca7ec1b9c0f046548a6 by Kai Uwe Broulik.
Committed on 16/02/2015 at 15:44.
Pushed by broulik into branch 'Plasma/5.2'.

Use smooth transformation for scaling down the user picture

Thanks to Martin Häggström for the patch
FIXED-IN: 5.2.1

M  +1    -1    kcms/useraccount/chfacedlg.cpp

http://commits.kde.org/plasma-desktop/1d4eb597c573caa7bf28dca7ec1b9c0f046548a6