Photoshop: Resampling cropped smart object uses cropped off pixels

  • 2
  • Problem
  • Updated 4 years ago
  • (Edited)
1 - Make 10x10px image.
2 - Use pencil tool (1px, 100% hardness) to draw a 1px black border all the way around.
3 - Convert background layer to smart object
4 - Canvas size to 8x8px, leaving cropping centered
5 - Image size to 100x100px.

You'd expect to now have a 100x100px pure white document, but you get a fading-in gray.

The resampling algorithm is using the off-the-canvas cropped off black pixels.

My crop's "Delete Cropped Pixels" is checked, but obviously cropping a smart object like this doesn't exactly "delete" the pixels. But, resizing should still act like they were.

Using PS CC 14.2.1 x64
Photo of Michael Darling

Michael Darling

  • 6 Posts
  • 0 Reply Likes
  • frustrated

Posted 4 years ago

  • 2
Photo of Michael Darling

Michael Darling

  • 6 Posts
  • 0 Reply Likes
Workaround:
* Duplicate smart object layer
* Rasterize the duplicate
* Select-all, copy to new document, select-all in new document, copy back to first document (Previous rasterizing step leaves off-the-canvas pixels)
* Re-smart-object the duplicate (If you want to still use as smart object)
* Keep original hidden, if you want to keep it around (Massive resizing means much larger filesize though)
* Any time you update the contents of the original smart object, go through workaround steps again
Photo of Michael Darling

Michael Darling

  • 6 Posts
  • 0 Reply Likes
Scratch that..... This generates transparent pixels around edges.
Photo of Michael Darling

Michael Darling

  • 6 Posts
  • 0 Reply Likes
So, in workaround, after copying back into first document, Layer->New->Layer from Background... And only convert to smart object AFTER the resize, if you need smart filters.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 766 Reply Likes
It is doing exactly what it should - resampling the image you have (which includes those black pixels off the edge).
Photo of Michael Darling

Michael Darling

  • 6 Posts
  • 0 Reply Likes
Ok, let me phrase an alternate workflow.

Instead of canvas sizing to 8x8px, using the cropping tool with "Delete Cropped Pixels" checked. Even though the smart object's pixels aren't truly going to be deleted, shouldn't it honor treating those pixels as deleted, and not use them in any type of calculations?

(I just tried this alternate method, and the behavior doesn't change.)

It was really nice to think I could open an original photograph to scan, immediately convert it to a smart object, crop, and resize. This would leave the original "tucked away", unmodified.

Then, if I needed to resize again later, I didn't have to worry about re-cropping because the resampling went different and changed where the crop needed to happen.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
If you delete the cropped pixels, then the cropped pixels are not used for resampling, because they're gone.

What you describe is exactly how smart objects work - the original is there, unmodified. You can crop and resize it all you like, and the original is still available to tweak, and any further resizing is done from the original.
Photo of Michael Darling

Michael Darling

  • 6 Posts
  • 0 Reply Likes
So, there should be NO way to truly crop pixels off a smart object? What's wrong with when using the crop tool acting differently whether "Delete Cropped Pixels" is checked?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
not really, since the smart object always retains it's original pixels and resamples from them. The crop tool only affects the plain pixel layers, it can't affect the original data for your smart object.