Bug 371005 - Zoom function doesn't work properly on HiDPI Display
Summary: Zoom function doesn't work properly on HiDPI Display
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Image (show other bugs)
Version: 5.2.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-17 15:15 UTC by younker.dl@gmail.com
Modified: 2019-05-05 08:00 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description younker.dl@gmail.com 2016-10-17 15:15:55 UTC
When viewing or editing an image, if the HiDPI display has set up the scale factor, the image will zoomed based on the scale factor. for example, if an image is 1000x1000 pixels and scale factor of display is set to 2, when choose actual size or zoom to 100%, the image will be displayed in 2000*2000 pixels. 

I don't think this behaviour is right comparing to Mac and Windows on HiDPI display. For image and video we should ignore the scale factor settings and just display the content in pixel to pixel format. 

Reproducible: Always

Steps to Reproduce:
1. Open Image
2. Zoom to 100% 
3. check the actual size comparing to the size of exif information. If the scale factor is not 1, the image size should be same as the exif one, not calculated by the scale factor.


Expected Results:  
the image zoom function should not based on the scale factor settings
Comment 1 younker.dl@gmail.com 2016-10-18 00:15:46 UTC
Just tried xnviewmp. And it shows the image correct,  just behave like on others platforms. So this is an issue of our code implementation.
Comment 2 younker.dl@gmail.com 2016-10-27 11:26:59 UTC
I tried to learn QT programming and just tested with QGraphicView, it does show the image based on the scale_factor settings which is not right based on my experience on other platforms. So this may be a Qt bug. but can we do something on our codes to make the behaviour better?
Comment 3 caulier.gilles 2016-10-27 12:47:54 UTC
If i remember, there is already code relevant in DK to fix this problem.

And this Qt problem can be fixed with last 5.7. I'm not sure.

Look this entry :

https://bugs.kde.org/show_bug.cgi?id=337231

... and all patches applied to DK source code.

Gilles Caulier
Comment 4 younker.dl@gmail.com 2016-10-28 01:07:25 UTC
I tried on Windows with a sample code to show a picture through QGraphicsView, it works on Windows perfect, but not on Linux. I think this is the issue of Qt. It is not fixed on Linux at all
Comment 5 caulier.gilles 2016-11-28 11:26:39 UTC
Can you reproduce the problem using digiKam Linux AppImage bundle ? The last
bundle is available at this url:

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier
Comment 6 younker.dl@gmail.com 2018-08-17 01:08:23 UTC
(In reply to caulier.gilles from comment #5)
> Can you reproduce the problem using digiKam Linux AppImage bundle ? The last
> bundle is available at this url:
> 
> https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM
> 
> Gilles Caulier

I didn't use the appbundle of digikam. But from my digikam and gwenview on my gentoo box, the behaviou is same. What I expect is to have the image displayed in 1:1 pixel mapping no matter the zoom rate I selected for HiDPI display. That will make the image really sharp.
Comment 7 caulier.gilles 2018-08-17 07:35:55 UTC
You must take a try of current AppImage bundle of 6.0.0 pre-release where more than 300 files are now closed since last 5.9.0 stable release.

The bundle is available here :

https://files.kde.org/digikam/

Thanks inadvance

Gilles Caulier
Comment 8 younker.dl@gmail.com 2019-04-08 04:59:47 UTC
gwenview will have fix for this in 19.04 release and thumbnail part will be fixed in 19.08. Is there any update for digikam? 

https://bugs.kde.org/show_bug.cgi?id=373178
Comment 9 Maik Qualmann 2019-05-03 16:56:27 UTC
Git commit cb6b0ef7519471b78e7cd04807af24b2f893e982 by Maik Qualmann.
Committed on 03/05/2019 at 16:53.
Pushed by mqualmann into branch 'master'.

fix HiDPI problem under Linux # 1
- Preview
- Light Table
- Image Editor
- Slideshow
- Thumbnails not yet
Related: bug 403197, bug 381128

M  +4    -2    core/libs/widgets/graphicsview/graphicsdimgitem.cpp
M  +2    -1    core/utilities/imageeditor/widgets/imagepreviewitem.cpp
M  +2    -1    core/utilities/slideshow/slideimage.cpp

https://invent.kde.org/kde/digikam/commit/cb6b0ef7519471b78e7cd04807af24b2f893e982
Comment 10 Maik Qualmann 2019-05-05 08:00:17 UTC
Git commit 4c8c1f998d03064fc5e92a9d0214394965f52cb5 by Maik Qualmann.
Committed on 05/05/2019 at 07:57.
Pushed by mqualmann into branch 'master'.

fix zoom image on HiDPI display
Related: bug 403197, bug 381128
FIXED-IN: 6.2.0

M  +2    -1    NEWS
M  +4    -0    core/dplugins/generic/view/glviewer/glviewertexture.cpp
M  +2    -2    core/libs/widgets/graphicsview/graphicsdimgitem.cpp
M  +18   -14   core/libs/widgets/graphicsview/imagezoomsettings.cpp
M  +2    -1    core/libs/widgets/graphicsview/imagezoomsettings.h
M  +2    -2    core/utilities/imageeditor/widgets/imagepreviewitem.cpp

https://invent.kde.org/kde/digikam/commit/4c8c1f998d03064fc5e92a9d0214394965f52cb5