Bug 368939 - Option to automatically reduce size for HiDPI captures, which otherwise are humongous
Summary: Option to automatically reduce size for HiDPI captures, which otherwise are h...
Status: CONFIRMED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 19.12.3
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Peter Wu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-17 09:49 UTC by Ryan Swart
Modified: 2023-12-13 21:28 UTC (History)
8 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 Ryan Swart 2016-09-17 09:49:11 UTC
With a high-dpi monitor, screenshots are far larger than they need to be, and need to be opened in gwenview or an image manipulation for resizing before they are usable. Having a pre-set resolution that the image can be resized to after capture, would remove that step and enable interesting workflow optimizations (eg. make website/app preview images easy to thumbnail).
Comment 1 Peter Wu 2016-10-13 01:08:45 UTC
Do you think that this scaling would be a useful default option? A preference could then be added to override the behavior. Possible suggestion:

 [ ] Disable downscaling for HiDPI screens
 The default behavior for HiDPI screens is to save an image scaled down to a nornal size. Enable this option to save the image in the original size instead.

Would this make sense?
Comment 2 Ryan Swart 2016-10-14 00:49:33 UTC
Hmm, that would make the default output better, but is detecting Hi-DPI easy when you have a multi-monitor setup?

Also, the useful byproduct of making thumbnails/previews wouldn't be possible if we limit it to detected HiDPI downscaling
Comment 3 Peter Wu 2016-10-20 21:14:15 UTC
Hi-DPI can be detected per-screen, but maybe it is not a good idea to scale down due to loss of details (hey, you *do* want to let your friends know of your fancy screen right :p).

If you want to have the scaling option, do you have an idea how to add it without making the interface too complex? Consider your workflows, what impact would possible changes have?

The latest master has some other hi-dpi fixes btw, crop now works sanely and the preview is not blurry anymore.
Comment 4 Boudhayan Gupta 2019-06-11 23:51:14 UTC
I don't actually think this is a terrible idea. This might actually help us with all those pesky "things don't work when we have different DPIs on differen displays" - let's just scale everything down to the lowest common denominator. Comments?
Comment 5 Peter Wu 2019-07-21 11:46:54 UTC
Support for multiple monitors with different DPIs is a slightly different issue. I think it would make sense to scale down to one with the lowest resolution. It might however be informative to see how other operating systems or desktop environments handle it.
Comment 6 signupemail 2019-11-04 22:13:22 UTC
I too have HiDPI and I too would like something like this - whether as a default or not - implemented. At present I have to export all screenshots to GIMP and scale them down.
Comment 7 elman 2020-10-14 16:16:14 UTC
I just tried Wayland and Spectacle on 4K and my screenshots are only FHD. And I would like to be them in 4K. So I guess this issue should be addressed also on Wayland, where things behave differently.
Comment 8 Nate Graham 2020-10-14 17:03:30 UTC
You're reporting Bug 409762. This bug report tracks the opposite: optionally reducing the resolution of HiDPI screenshots to the level of what you're already seeing.

In fact you could say this is already fixed on Wayland LOL
Comment 9 Méven Car 2020-10-22 09:32:17 UTC
(In reply to Ryan Swart from comment #0)
> With a high-dpi monitor, screenshots are far larger than they need to be,
> and need to be opened in gwenview or an image manipulation for resizing
> before they are usable. Having a pre-set resolution that the image can be
> resized to after capture, would remove that step and enable interesting
> workflow optimizations (eg. make website/app preview images easy to
> thumbnail).

The issue is about image formats : the typical file format used for screenshot png has capability for pixel ratio but is rarely supported AFAIK https://www.w3.org/TR/2003/REC-PNG-20031110/#11pHYs http://www.libpng.org/pub/png/book/chapter11.html#png.ch11.div.8

The good news is it seems Qt/QImage is supporting this https://code.woboq.org/qt5/qtbase/src/gui/image/qpnghandler.cpp.html#1076 so spectacle could support this with some effort in some cases. For instance in multi-screen with wayland and multiple scaling factor this would make little sense. But single screen screenshots or rectangular would be candidate.
The other option to allow to take downscaled screenshots would loose resolution and details so this is not advisable and might make your screenshot unusable.

https://invent.kde.org/graphics/spectacle/-/merge_requests/29 fixing https://bugs.kde.org/show_bug.cgi?id=409762 will allow on Wayland when in a multi-monitor setup to take screenshots with each screen downscaled by their own scale factor (loosing details!).

In the meantime you'd need to convert the image to lower resolution/scale down the image, https://www.html5rocks.com/en/mobile/high-dpi/ gwenview or imagemagick do that like a charm.