Summary: | Fit to window size not working if image is smaller then window size. Add a new option for zooming in preview [patch] | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | AT <andreas> |
Component: | Preview-Image | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | caulier.gilles, digiquest, evorster, jens.ramke, metzpinguin, oldk1331 |
Priority: | NOR | ||
Version: | 5.4.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/digikam/commit/0d0ea857da42b34220c7460bd9359fc5a79922c5 | Version Fixed In: | 8.1.0 |
Sentry Crash Report: | |||
Attachments: |
Gwenview Not Fitted
Gwenview Fitted Digikam Fit Gwenview Settings |
Description
AT
2011-06-06 22:57:11 UTC
For me this is WONTFIX because intended: Fit-to-window is for the usual case of large images. With small images, like icons, zooming in automatically is often not desired, if the image is really small you'll having nothing but a zoom artifact. As DigiKam doesn't actually automatically zoom in (at least it didn't before 2.0), it would be still up to the individual user if he wants to blow the image up to fullscreen. I find it fairly usefull to see if an image that's not quite as big as my screen still looks nice, especially in fullscreen mode. And the old behaviour just was faster then using then + key at times. At least the name should be changed then, because 'fit image to window size' conveys the message it's increasing the image if it is smaller then the window, or reduce it if it's bigger. And it shouldn't reset an image zoomed to window size back to it's original size either in my opinion. AT, This problem still valid using digiKam 4.2.0 ? Gilles Caulier Behaviour is unchanged - images smaller then the window stay small, or if they had been zoomed, they revert to their original size. If I interpret Marcel's comment correctly, this behaviour is supposed to be a feature. And by looking at this bug report I'm probably the only one missing the old behaviour. :-P ;-) At, What's about this file using digiKam 4.10.0 ? Gilles Caulier This file still valid using last digiKam 5.0.0 ? Gilles Caulier 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 Hi there, sorry I didn't pick up on the last comments. Kind of missed them though I'm sure I must have read the mail notification. Yes, behaviour is unchanged with digikam-5.4.0-01-x86-64.appimage (dito with digikam-5.3 on sabayon). Will it be possible to add an option to 'stretch the smaller images to fit windows'? One of the image viewers called Honeyview actually supports this function and it's very useful. The monitor resolutions are getting higher and higher and many of my old photos look too small now. The screen resolutions increase... but an old photo becomes blurred the larger you zoom it. Even if Marcel's Comment 1 is older, I fully agree. Maik True, it will look blurry if you zoom in, but obviously there are people who prefer bigger view and care less about how blurry it is. I'm not saying it should be 'fixed' or anything, just saying it would be great to have as an option. (Unless it's technically difficult to implement or something like that, of course.) *** Bug 425342 has been marked as a duplicate of this bug. *** After my patch in https://bugs.kde.org/show_bug.cgi?id=434049 is applied, together with this following patch, we can have "fit to window" to always fit to window, instead of current behavior. Developers, this is 2021 now, where 4K screen is more and more popular. So viewing a 1 million pixel picture on a 8 million pixel screen is not that uncommon. Also, zoom such pictures on this hiDPI screen is not blurry at all. The old behavior can be achieved via a manually set fixed 100% zoom level. --- a/core/libs/widgets/graphicsview/previewlayout.cpp +++ b/core/libs/widgets/graphicsview/previewlayout.cpp @@ -259,7 +259,7 @@ void SinglePhotoPreviewLayout::fitToWindow() d->isFitToWindow = true; - d->zoomSettings()->fitToSize(d->frameSize(), ImageZoomSettings::OnlyScaleDown); + d->zoomSettings()->fitToSize(d->frameSize(), ImageZoomSettings::AlwaysFit); d->item->sizeHasChanged(); updateLayout(); d->item->update(); The discussion is quite old and exist also for Gwenview, because Gwenview doesn't zoom in any small images either. The whole thing has nothing to do with 4k and high resolutions. We also have users who use digiKam to manage graphics and icons. I have just tested it with your patch, zooming in is not suitable for graphics. It doesn't always look pixelated, but your suggestion is to go 100% to get the old behavior back. This is ok as long as the graphics are smaller, with larger graphics you have to select fit to window each time. For me it is clear that this behavior has to be configurable. Maik Yes, a configurable option is the right way to do things. Anyway, I can apply this patch locally on my system, or use fullscreen instead as a workaround. There is nothing inherently wrong with pixelation or blurriness. It's just the result of a resampling algorithm (e.g. Nearest neighbor for pixelation) and can be desired depending on the use case. The behavior (i.e. "zoom" level) and algorithm should be configurable separately for sub- and super-sampling. Ideally in a way that can be easily adopted by Gwenview and others. Created attachment 158794 [details]
Gwenview Not Fitted
Screenshot of Gwenview with fit image not clicked
Created attachment 158795 [details]
Gwenview Fitted
Screenshot of Gwenview with "Fit" clicked
Created attachment 158796 [details]
Digikam Fit
This is what the image looks like in DigiKam, whether fit has been clicked or not.
This IS a VERY old discussion, but as screen resolutions keep increasing, it only becomes more relevant, instead of less relevant. Gwenview now assumes that "Fit" means fit the image to the window, which means that it would scale larger images smaller to fit, as well as scale smaller images larger to fit. (attached screenshots to show) For DigiKam, there is already a "Zoom to 100%" button, that would make small images appear small, and large images appear large. It would only make sense to now make "Fit to window" to actually make small images fit to larger windows as well. This issue has been bugging me for a long time, as it's really annoying to have to set the zoom scale for small images. Because people have been asking for this for a long time, it is a requested feature. Of course some people don't want small images enlarged, and that's fine too. Why not simply have a configuration option in settings that states "Enlarge smaller images to fit window"? People who don't like to see small images enlarged can leave it off, and people who would want their images enlarged can switch it on. This would satisfy both use cases for minimum effort. Created attachment 158798 [details]
Gwenview Settings
Screenshot of the Gwenview settings dialog, which has exactly this setting suggested in my comment
Git commit 0d0ea857da42b34220c7460bd9359fc5a79922c5 by Maik Qualmann. Committed on 10/05/2023 at 20:07. Pushed by mqualmann into branch 'master'. add option to scale always small images to fit to window FIXED-IN: 8.1.0 M +1 -1 NEWS M +3 -0 core/app/views/preview/itempreviewview.cpp M +2 -0 core/libs/settings/applicationsettings.cpp M +3 -0 core/libs/settings/applicationsettings.h M +10 -0 core/libs/settings/applicationsettings_iconview.cpp M +3 -0 core/libs/settings/applicationsettings_p.cpp M +2 -0 core/libs/settings/applicationsettings_p.h M +14 -7 core/libs/widgets/graphicsview/graphicsdimgview.cpp M +1 -0 core/libs/widgets/graphicsview/graphicsdimgview.h M +30 -18 core/libs/widgets/graphicsview/previewlayout.cpp M +5 -0 core/libs/widgets/graphicsview/previewlayout.h M +10 -3 core/utilities/setup/album/setupalbumview.cpp https://invent.kde.org/graphics/digikam/commit/0d0ea857da42b34220c7460bd9359fc5a79922c5 Git commit 24b751944732897643662e604066ea822e9cac66 by Gilles Caulier. Committed on 11/05/2023 at 05:46. Pushed by cgilles into branch 'master'. Online documentation: add new option to enlarge small image to the canvas size. Related: bug 425342 M +- -- setup_application/images/setup_album_preview.webp M +3 -1 setup_application/views_settings.rst https://invent.kde.org/documentation/digikam-doc/commit/24b751944732897643662e604066ea822e9cac66 |