Bug 447805 - File picker previews don't properly render small images
Summary: File picker previews don't properly render small images
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: General (show other bugs)
Version: 5.0.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-02 00:14 UTC by tomtomtomreportingin
Modified: 2022-01-09 15:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tomtomtomreportingin 2022-01-02 00:14:24 UTC
SUMMARY
The added preview for the 5.0's appimage's file picker does not properly display small images, seeming to give a zoomed-in rendering.

STEPS TO REPRODUCE
1. Create a 100x100 canvas.
2. Draw some stuff.
3. Save the file.
4. Observe the thumbnail in File -> Open.

OBSERVED RESULT
The thumbnail gives a zoomed-in rendering of the image.

EXPECTED RESULT
The thumbnail should give an accurate impression of the image.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.88.0
Qt Version: 5.12.12 (appimage)
Comment 1 mvowada 2022-01-02 09:53:37 UTC
Hi, I can reproduce this on Ubuntu 18.04.6 LTS with appimage Version: 5.0.1-alpha (git 603a2f6)
Comment 2 Bug Janitor Service 2022-01-06 00:16:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1282
Comment 3 amyspark 2022-01-09 15:06:09 UTC
Git commit 7770a821e6f2cb66c45da14ca3ade4db39914167 by L. E. Segovia.
Committed on 09/01/2022 at 15:03.
Pushed by lsegovia into branch 'master'.

Fix sizing of preview images

There are inconsistencies in the resizing when the image is either too
small or the height is bigger than the width.

Applying the centering correction against maxIconSize will cause parts
of the image to be chopped off if the iconSize is smaller than the
result size.

Also draw preview in high res on Hi-DPI displays.

M  +13   -8    libs/ui/utils/KisFileIconCreator.cpp
M  +3    -1    libs/widgetutils/KisPreviewFileDialog.cpp

https://invent.kde.org/graphics/krita/commit/7770a821e6f2cb66c45da14ca3ade4db39914167
Comment 4 amyspark 2022-01-09 15:07:07 UTC
Git commit 5d1893c91797c0a45f97494aba6bc340fc84c674 by L. E. Segovia.
Committed on 09/01/2022 at 15:06.
Pushed by lsegovia into branch 'krita/5.0'.

Fix sizing of preview images

There are inconsistencies in the resizing when the image is either too
small or the height is bigger than the width.

Applying the centering correction against maxIconSize will cause parts
of the image to be chopped off if the iconSize is smaller than the
result size.

Also draw preview in high res on Hi-DPI displays.
(cherry picked from commit 7770a821e6f2cb66c45da14ca3ade4db39914167)

M  +13   -8    libs/ui/utils/KisFileIconCreator.cpp
M  +3    -1    libs/widgetutils/KisPreviewFileDialog.cpp

https://invent.kde.org/graphics/krita/commit/5d1893c91797c0a45f97494aba6bc340fc84c674