Bug 510629 - Spectacle does not write correct DPI metadata to saved images
Summary: Spectacle does not write correct DPI metadata to saved images
Status: RESOLVED WORKSFORME
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 6.4.5
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-15 07:21 UTC by 人力脑机
Modified: 2025-11-18 03:47 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 人力脑机 2025-10-15 07:21:16 UTC
When saving screenshots, Spectacle does not correctly embed the DPI (dots per inch) value in the image metadata. As a result, when the image is opened on devices or displays with different DPI settings, the displayed physical size of the image is incorrect — for example, screenshots appear larger or smaller than intended.

This issue affects workflows where the image's physical dimensions are important, such as documentation, printing, or high-DPI display consistency.

Steps to reproduce:

Take a screenshot using Spectacle.

Save the image as PNG or JPEG.

Inspect the image metadata using tools such as identify -verbose (ImageMagick) or exiftool.

Expected behavior:
Spectacle should store the correct DPI value (e.g., 96 DPI or the actual screen DPI) in the image metadata, so the image displays at the intended physical size across different devices and applications.
Comment 1 Lenzoid 2025-10-15 09:57:06 UTC
Can confirm this. Did a quick comparison: Windows 11 didn't save this information either when doing a fullscreen screenshot with Snipping Tool (Win+Shift+s). MacOS did correctly save it. For example

exiftool '-*resolution*' Example-fullscreen-Screenshot-macos.png
X Resolution                    : 144
Y Resolution                    : 144
Resolution Unit                 : inches

I believe these are the pertinent values for the retina screen they were taken on. Can you give a more specific example of a workflow when this can become a problem for you? Personally, when including a screenshot in a document, for example including an image inline in an email in Thunderbird, I'm so used to it being included in the totally wrong dimensions, so I'm used to resizing every single screenshot by hand. ;)
Comment 2 人力脑机 2025-10-16 02:14:54 UTC
(In reply to Lenzoid from comment #1)
> Can confirm this. Did a quick comparison: Windows 11 didn't save this
> information either when doing a fullscreen screenshot with Snipping Tool
> (Win+Shift+s). MacOS did correctly save it. For example
> 
> exiftool '-*resolution*' Example-fullscreen-Screenshot-macos.png
> X Resolution                    : 144
> Y Resolution                    : 144
> Resolution Unit                 : inches
> 
> I believe these are the pertinent values for the retina screen they were
> taken on. Can you give a more specific example of a workflow when this can
> become a problem for you? Personally, when including a screenshot in a
> document, for example including an image inline in an email in Thunderbird,
> I'm so used to it being included in the totally wrong dimensions, so I'm
> used to resizing every single screenshot by hand. ;)

Thanks for your reply!

The reason it’s important to include the resolution (DPI) information in the image metadata is that different devices have different DPI values. For example, if I take a screenshot on a 24-inch 4K display (around 184 DPI) and then view the same image on a 24-inch 1080p display (around 92 DPI), the screenshot appears much larger on the lower-resolution screen.

If the screenshot file contains the correct DPI metadata, image viewers and document editors can display it at the correct physical size, matching what was originally shown on the source display. Without this information, the viewer software has no way to know the actual intended print or display size, so it defaults to assuming 72 DPI or 96 DPI, which causes inconsistent visual scaling between devices.

This becomes a real problem when sharing screenshots for UI design reviews, documentation, or printed materials, where maintaining accurate physical size or proportions is important.
Comment 3 David Edmundson 2025-10-16 09:23:52 UTC
None of KDE's image viewers will take the supposed DPI into account. They show a pixel as a pixel.  
We can store it, but I'm quite confident it won't solve the problem you're trying to fix.

You can modify the DPI with imagemagick, please confirm if it would solve your use-case and how you tested it, then reopen.
Comment 4 Lenzoid 2025-10-19 10:59:05 UTC
Surely it depends on what software and hardware these images are viewed with. 人力脑机, it might help if you provided some examples how to view these screenshots in order to see the behavior you're describing. Most of us just use KDE software, which David pointed out does ignore it. I have a Macbook here but I'm only touching that with 10-foot poles.
Comment 5 Bug Janitor Service 2025-11-03 03:47:52 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2025-11-18 03:47:26 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.