"Resize image to fit" action is blurring the image

I'm using the "resize image to fit" action, and the resulting image file is quite blurry. Here's the process:

  1. I capture a screenshot with CleanShot, which is set to save the screenshot to a file, and also put it on the system clipboard.
  2. A Keyboard Maestro macro uses the "resize image to fit" action, set to resize the width to 400 and the height to 800. (My goal is to restrict the width to 400 and let the height fall wherever it falls.)
  3. A "Write system clipboard to file" saves the file in the specified directory. (I've tried both JPG and PNG with the same blurry result)

Here's an example
The file CleanShot saves to my “Screenshots” directory is perfectly sharp.
The file Keyboard Maestro reduces from 500 px to 400 px and saves to my Obsidian inbox folder is quite blurry, as you can see here:

In the foreground is the slightly reduced-size file saved by KM, and the background is the area from which the original screenshot was made.

I disabled the "resize image to fit" action, so KM just saved the clipboard to a JPEG file without resizing, and it did not get blurred. So there must be something I'm doing wrong with the "resize image to fit" action:

I'm a little confused here, because this:

image

Seems to indicate the initial image is 4160 x 6240 pixels, in which case reducing it to fit within 400 x 800 would be an extreme reduction and not surprising it is not sharp.

That said, the resulting image still shows:

image

which seems like it has not been reduced in size at all, but I don't know whether that is just a cached value.

Perhaps if you provided the image to go along with the macro then it might be possible to suggest more. But 400px wide is not much, I'd expect it to be blurry.

What app are you using to display the test 3.jpg file and is Lightroom the app you're taking the screenshot of?

OK - I've done my own tests using this procedure:

  1. Capture an area of the screen bigger than 400x400 (test original.png)
  2. Resize the original to fit using your macro (test KM.png)
  3. Resize the original to fit using the Preview app (test preview.png)

Looking at the 2 resized images I can't see much difference - but importantly they both exhibit the same degree of blur you refer to.

Here are the images:

test KM

test preview

From this I conclude that it's not KM blurring the image, rather it's just a consequence of the size reduction process offered by macOS.

To make sure of this conclusion, I used Photoshop to resize the original and guess what - it's blurred too! Here it is:

test photoshop

Here are all 4 of these images in a zip for you to compare yourself:

test images.zip (1013.9 KB)

I can see why you'd like the resized version to be more clear for you Obsidian vault, but I can't offer you a solution for that I'm afraid.

I can see I created some confusion by taking a screenshot of a grid of images that displayed pixel dimensions. I could've made a screenshot of anything that has clear lines, such as text on a web page or part of a Finder window.

So, I'm not reducing those large images. I'm only reducing screenshots. (How would I get a 4160 x 6240 image on the clipboard? My Eizo display is only 3840 x 2160.)

In my example, I took a screenshot of a Library grid in Adobe Lightroom that just happened to be visible on my display, using CleanShot to drag the capture area until CleanShot says it’s about 450 wide. So, the image on the clipboard is about 450 wide, and I'm only reducing it to 400.

The JPEG file is displayed by the Finder QuickView.

As I told Peter, below, I can see I created some confusion by taking a screenshot of a grid of images that displayed pixel dimensions. I could've made a screenshot of anything that has clear lines, such as text on a web page or part of a Finder window.

In my example, I took a screenshot of a Library grid in Adobe Lightroom that just happened to be visible on my display, using CleanShot to drag the capture area until CleanShot says it’s about 450 wide. So, the image on the clipboard is about 450 wide, and I'm only reducing it to 400.

Yes, I understood what you'd done and that's what I did. My capture was 801 pixels wide as you can see if you look at the images I uploaded.

But my conclusion remains - you can't avoid the blurring.

You could try turning off image resampling when you do the resizing - but that's not an available option in KM. The Preview app does offer that if you want to try, but then you'd need some way to call that from KM - I guess that would require AppleScript or some such.

Thanks for the detailed response. It led me to examine my screenshot falls more closely, and I saw that my screenshots are double the dimensions that the CleanShot marquee displays as you drag it out.

So, when I drag the marquee to 500 wide and take the screenshot, according to the Finder Get Info window, it's actually 1000 wide!

Thus I am reducing much more than I thought. I've written CleanShot support to see what's going on. They do have a setting, "Scale Retina screenshots to 1x,” but my display is not Retina: It's an Eizo CS2740 set at 2560x1440.

I’ll see what they say, probably a few days after today's Thanksgiving holiday. (however, I have no idea where they're located!)

Best,
Russell

1 Like

Why do you say your display isn't retina? According to a listing at B&H, that's a 4K display, which has a native resolution of 3840x2160. It's "true" retina resolution, which is what macOS would probably default to, is 1920x1080. You're running it at an interpolated size, effectively having it act like a 5K display in retina mode. (I did the same thing with a Dell 4K display to match my iMac's 5K display.)

But it's still a retina display to macOS, which you can prove with a simple test: Take a screenshot of a region of the screen (say 400x200) to the clipboard, then paste into Preview and press Command-I to open the info panel. You'll see that the image resolution is 144dpi, and the actual pixel dimensions are 800x400, not 400x200.

If your eyes can handle it, set the display to its full 4K resolution, and repeat the experiment. You'll see that the image doesn't have a 144dpi resolution—Preview won't even show the resolution. But paste it into Acorn or another bitmap image editor, and you'll see it's a 72dpi image.

In short, if you're taking screenshots on a 4K display, unless it's set to true 4K native resolution, you're on a retina display, and need to take that into account: If you take what appears to be a 500px wide screenshot, it's really 1000px wide, and all your adjustments should take the doubling into account.

-rob.

1 Like

Thanks for clarifying.

I didn't know "Retina" just meant 4K display. I thought it was some special technology Apple put in their displays.

I'll try using CleanShot's "Scale Retina screenshots to 1x” feature.

It actually doesn't mean 4K display, it means "a display whose perceived resolution is less—typically half—than its full native resolution." I'm paraphrasing, but that's basically it.

In other words, if macOS had a small enough UI, you could take an old 1024x768 monitor and set it to display at 512x384 resolution, and it'd be a retina display. Everything would appear extra sharp, because each pixel you see is represented by two actual pixels in the display.

-rob.

Got it. Thanks.