Cropped image quality

Quality of cropped image decreases

1 Like

Hi Paulius :wave: ,

On your example looks like you are using a screenshot to showcase your point. If this is correct, it is important to note that quality issues is often more noticeable with screenshots since they’re usually captured at a lower resolution (screen resolution) compared to other high-res images.

But since you mention a decrease, I assume you can see some quality difference between crops when using different Sketch versions. Could you tell me which versions you used so I can investigate this a bit more?

Cheers :pray:

I’m using Sketch 101.
I’ve just noticed that after restarting Sketch I don’t see this problem.

I think it has something to do with Sketch’s performance. When it starts to slow down after a few hours of work, I start to notice all sorts of problems.

I’m running into the same thing. At first I thought it was when I cropped the image, but I’m finding that even when I exit image editing, the fidelity degrades. Steps:

  1. I have a large (2550 x 3300) jpg image
  2. I double click to edit the image
  3. I click “Finish Editing”

Results:

  1. The image fidelity is materially worse.
  2. The image y coordinate has moved ~5 pixels.

What’s weird:
The “Original Size” button is enabled despite that I did not resize the image. When I click it, it thinks the original size is 612 x 792. This button and behavior is present even before I enter the image edit mode.

If I reimport the original image, I don’t see the loss in fidelity after using the image edit mode.

Hello there, @hefalump!

I think I know what is happening in your scenario. Could you check the DPIs of the image you are importing on your end? You can do it by opening the image with Preview, and in the Menu Bar, go to Tools > Adjust Size. There you will see the “Resolution” field:

We already opened an internal case to solve this, but basically, when you enter editing mode, the image is being set with the “default” 72DPI.

As a workaround, you can modify the image’s DPIs before importing them (you can use the macOS Preview). To achieve that, you can follow these steps:

  1. Open the bitmap in Preview
  2. Select Tools > Adjust Size in the Menu Bar
  3. Uncheck the Resample image box
  4. Change resolution to 72
  5. Save and close

After that, you shouldn’t experience the jump to low quality you have experienced.

Could you try it out and let us know how it goes? And apologies for the inconvenience this may be causing :pray:

I’m afraid no one will use this option. It would be time-consuming to adjust images that have already been imported, or to spend time adjusting them before importing. We need a reliable way to import and manipulate any image at any resolution without losing detail.

I agree that this workaround is not perfect and requires several clicks. But we are already working on it, so once we fix it, this will no longer be necessary, and you will be able to edit your images directly without the low-resolution jump that haunts us right now.

Sorry again for this @Paulius, but rest assured we are aware and planning this to be fixed!

Cheers!

3 Likes

Hi diegogdag. Thanks for the problem solving, and you may be on to how to deliver a fix for this bug, but I should be clear–when I re-import the image–either at 300 dpi or adjusted to 72 dpi, image editing / cropping works without issue. I can’t re-create the steps to get the image into the problematic state, but somewhere along the way, Sketch decided that the image’s “original size” is actually 24% of its actual original size. (And you are right: 72 dpi / 300 dpi = 24%) With a fresh import of the 300 dpi image, the “Original Size” button is disabled because whatever the bug is that causes the resizing hasn’t been triggered yet. It’s also worth noting that even though the bug has changed the original size parameters for the image, the image still displays at its true, high-fidelity resolution until the image is re-rendered when finishing the edit process. I hope that helps. This issue isn’t obstructing my workflow, but I’m sure it’s something you’ll want to fix.

Ah - I can replicate it:

  1. Import a 300 dpi jpg
  2. Make a copy of that image using cmd-c / cmd-v
  3. The “Original Size” button is now enabled for the new image, presumably because a bug assumed a 72 dpi image.
  4. Edit the image, such as cropping it.
  5. When you click “Finish Editing”, the image will now render at the reduced fidelity.

That’s it, @hefalump!

This issue is triggered every time you apply editing to the “over-DPI’d” image (it also happens, for example, if you use the Instant-Alpha tool).

I will let you know how we are doing with the investigations! :pray:

1 Like