Skip to main content
Known Participant
November 21, 2023
Question

Screenshot DPI in Ps

  • November 21, 2023
  • 6 replies
  • 2765 views

Why Ps doesn't care about screenshot DPI? I take a screenshot (with Snipping Tool in Windows 11), and when I create a new doc in Ps, it can recognize the size (from the clipboard) but forces 72 DPI. The default screenshot DPI on my Windows is 96. If I paste it into MS Paint, it cares about DPI and saves JPG, PNG and ... as 96 DPI. Is there a way to force Ps to read the clipboard screenshot's DPI?

 

6 replies

D Fosse
Community Expert
Community Expert
November 22, 2023

TenTinAuthor
Known Participant
November 22, 2023

O! But you are not fun!

TenTinAuthor
Known Participant
November 22, 2023

Sorry guys, you all are pixel experts (!) and I am your headache, but don't be angry with me! I am an old tortoise, calm and cold blood! You live in an ivory tower, and I live in a Humble hut!

 

@Conrad_C By this, it means I wasn't wrong! The Clipboard DPI/PPI in Windows is 96!

 

@Stephen Marsh Thanks for the Script. It's cool. I tried, and it was exactly the thing I meant! Unfortunately, it ISN'T a NATIVE feature, and I have to assign an EXTRA keyboard shortcut!!!

 

Conclusion: Ps is idiot enough to get not the clipboard PPI/DPI! And you proved the clipboard PPI/DPI is 96, and also proved My idiot Ps can be forced to do the right job (grab the clipboard 96 PPI/DPI) with just multiple lines of codes (Script). Top of the most, you proved having a big name does mean nothing! Even a kindergarten painting app (MS Paint) can conduct the Godzilla to the hell!

Legend
November 22, 2023

You still don't understand. Its well past time for this thread to be locked.

TenTinAuthor
Known Participant
November 22, 2023

Could be more polite, Sir!!!

Stephen Marsh
Community Expert
Community Expert
November 21, 2023

@TenTin 

 

If you really, really want Photoshop to default to 96ppi you can use the following script to automatically create a new doc with the clipboard content and pixel width/height at 96ppi. A custom keyboard shortcut can be assigned to an installed script.

 

/*
New 96ppi Document from Clipboard Content.jsx
v1.0 - 22nd November 2023, Stephen Marsh
https://community.adobe.com/t5/photoshop-ecosystem-discussions/screenshot-dpi-in-ps/td-p/14247769
Based on:
https://community.adobe.com/t5/photoshop-ecosystem-ideas/feature-request-auto-paste-when-creating-clipboard-sized-file/idc-p/12984246
*/

#target photoshop

try {
    var origUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    // New Doc from Clipboard - Courtesy of the late Michael L. Hale
    var desc = new ActionDescriptor();
    var desc1 = new ActionDescriptor();
    desc1.putString(stringIDToTypeID("preset"), "Clipboard");
    desc.putObject(charIDToTypeID("Nw  "), charIDToTypeID("Dcmn"), desc1);
    executeAction(charIDToTypeID("Mk  "), desc, DialogModes.NO);
    activeDocument.paste();
    activeDocument.activeLayer = activeDocument.layers[activeDocument.layers.length - 1];
    activeDocument.activeLayer.remove();
    //activeDocument.flatten();
    activeDocument.resizeImage(null, null, 96, ResampleMethod.NONE);
    app.preferences.rulerUnits = origUnits;
} catch (error) {
    alert("The clipboard is empty or does not have suitable content to create a new document!");
}

 

 https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

Conrad_C
Community Expert
Community Expert
November 21, 2023

OK, I got curious and ran some tests.

 

I have Windows 10 in a virtual machine. I set both Snip & Sketch and the older Snipping Tool (now deprecated by Microsoft) to save screen shots to files instead of to the clipboard, to remove the variable of how a pasting application might interpret PPI. I had each application save the screen shot as PNG.

 

On macOS, I did the same thing using the built-in screen capture tool, on both a 1x and Retina 2x display. In macOS, the command line process “screencapture” is what is used by the standard macOS capture shortcut (Command+Shift+5), and the screen capture commands in Apple Grab, Apple Preview, etc.

 

I transferred all of the images to the Mac, and inspected PPI in Photoshop, Affinity Photo 2, GraphicConverter, and Adobe Bridge*. All agreed on the numbers in the table below, indicating that some screen shots saved with the bundled OS screen capture tools (not through the clipboard) on both Windows and macOS do include embedded PPI metadata, except for screen shots taken on the Mac on a 1x scale factor display. (My virtual machine is not doing Windows HiDPI properly, so I couldn’t test that.)

 

Platform

Capture application

HiDPI/Retina

Embedded PPI reported by apps

Windows 10

Snip & Sketch

1x

96

Windows 10

Snipping Tool (deprecated)

1x

96

macOS

OS “screencapture” process

1x

(none, some applications like Photoshop assume 72)

macOS

OS “screencapture” process

2x Retina

144

 

What does this have to do with the original question?

 

I have always believed that the way to fix an entire class of problems like this, is to stop using the clipboard for screen shots. On both macOS and Windows, I set all screen shot utilities to save a file to a screen shots folder, not going through the clipboard. That way, every screen shot is a discrete file that can be referred to or reused later, it can have full file properties such as ppi, it avoids dealing with how applications might interpret clipboard data, and it also saves the multiple steps of app switching, pasting, and manually creating a document for every screen shot, because the document is already created!

 

*Adobe Bridge 14 seems to have a strange bug where its metadata panel reports 96 ppi as 95, and 144 ppi as 143…

D Fosse
Community Expert
Community Expert
November 21, 2023

I honestly think this is getting overcomplicated.

 

The screenshot has no ppi. Any ppi number is assigned by the application opening and processing the screenshot. That includes screenshot utilities. In that processing, they assign a ppi value.

 

All applications will assign a ppi number if there isn't one - they may need to print it, they may need to calculate font sizes, and so on.

 

Microsoft applications, including any screenshot utilities, assign 96 ppi. That doesn't mean the screenshots are 96 ppi. It's just a chosen number. Photoshop chooses a different number, 72. Any number will do, as long as there is one.

 

All of the above also applies to retina/4K screens. With these screens, applications/OS perform a linear 2x scaling before the image hits the screen. So the captured screenshot is already 4x the pixel count, and processed in the same way. But usually with an assigned 2x ppi value.

D Fosse
Community Expert
Community Expert
November 21, 2023

A screenshot doesn't have a ppi value. It just has pixels.

 

The ppi value that you see is a default number assigned by the application that opens it.

Conrad_C
Community Expert
Community Expert
November 21, 2023

There might actually be no resolution metadata in the screen shot. What might be happening is:

 

MS Paint: If there is no resolution metadata, it probably assumes 96 ppi because that has been the Windows default for years.

 

Photoshop: If there is no resolution metadata, it is known to assume 72 ppi in many cases. This would be a wrong assumption in Windows, but like other Adobe applications that were first released on the Mac and later ported to Windows, Photoshop might still be assuming the 1990s-era Mac default of 72 ppi for images with no resolution metadata.

 

One way to test this:

1. Create a Photoshop document, and in Image Size, ensure the resolution is not 72 ppi, like set it to 96 or 300 or (what I do) a weird resolution like 273 that helps indicate whether the value is in the file and not assumed by the application.

2. Export that image using a command that is known to not include ppi metadata, such as File > Export > Export As.

3. Bring that exported image back into Photoshop, and choose Image > Image Size.

4. My guess is it will say 72 ppi. If it does, that means Photoshop assumes 72 ppi when no resolution metadata is included in the file.

 

Also, the bottom line for all of this: It may not matter one bit! Because if you look at both of your screen shots, the number of captured pixels is the same: 766 x 516 px. Especially for older 1x displays, ppi resolution is not an important part of screen shots, the pixel width and height is what’s important, and you have those, and they are the same in both applications.

 

PPI resolution does matter for HiDPI (Windows) and Retina (Mac) displays, because they use a pixel density scale factor. The system does need to know, for example, that 1532 x 1032 px on a 2x pixel density HiDPI display should be the same physical size as 766 x 516 px on a 1x display. But that is not a factor here.

Trevor.Dennis
Community Expert
Community Expert
November 21, 2023

That's an interesting take on it Conrad.  It has always annoyed me that images pasted into an Outllook post or Word document are so much bigger than they should be.