16

It isn't a big problem but if there is any way to do it than it would be great.
I want to erase the image but its remaining part is outside the canvas in Photoshop and can't erase it. It is in perfect position and don't want to move it.
enter image description here

Is there any way to erase it?

8 Answers 8

26
  • Select all
  • Choose Image > Crop from the menu.

This will delete all the pixels which fall outside the canvas.

Note it will not delete smart objects or vector/shape layers outside the canvas. To the best of my knowledge, there is no way to remove extra smart object or vector/shape layers outside the canvas.

4
  • best of my knowledge mean you are not sure, well it isn't smart object and worked. Thanks
    – Murtaza
    Commented Aug 27, 2014 at 20:14
  • 5
    Best of my knowledge means.. as far as I know. But I didn't develop Photoshop and it's not unheard of that there's a feature I'm unaware of.
    – Scott
    Commented Aug 27, 2014 at 20:15
  • Photoshop is one of those apps that you can use for 20 years, and still discover new features that have probably been there that entire 20 years. Thanks, +1. Tried with 19.0 and works great. Can't imagine they would drop the feature in 19.1. @VitoGentile sounds like user error to me. Commented May 7, 2018 at 10:26
  • Oh god! It saved my life Scott. I needed it for my projects! after 8 years it stills help people! :D Commented Jun 26, 2022 at 15:13
2

When cropping, check the 'Delete Cropped Pixels' box.

1

An alternative to try: select all (or make a selection of everything you want to keep), right click > layer via copy, use the copied layer and hide the original.

(I know this is a really old question I just thought some one else might end up here with a similar problem (like I just did...))

2
  • This only works if everything you're copying is on one layer. In many cases there would be multiple layers of art, and probably wouldn't be useful to have them all merged into one layer in order to use "layer via copy".
    – DLev
    Commented May 18, 2017 at 18:33
  • This is the perfect answer if you don't want the change to affect every layer though. +1
    – lucidbrot
    Commented May 10, 2018 at 6:21
1

I was wondering the same thing, found this question, but was not satisfied with the answers. My solution is to use Image>Canvas Size and then make it very large. Delete the stuff that is off of the canvas and you do not want using any of the usual methods. When you are done, return the canvas to the original size using Canvas Size again.

When you do layer via copy, you lose the ability to adjust the parts that are off the canvas that you want to keep.

1
  • I think Scott's answer is the best. Your method would provide more control over which layers get cleaned up and which don't, but it's very tedious. You would need to do each layer individually (afaik you can't do a delete on multiple selected layers....?) and you would need to keep track of how you sized the canvas initially (e.g. "Ok Adam, remember you added 1000 pixels to each side"). Scott's solution will handle all layers in 2 clicks. Commented May 7, 2018 at 10:34
0

For Smart Objects (using PS 21.1.1):

I'm posting this respone here as, like me, I'm sure others have landed here looking to crop smart objects or vector/shapes, such as rectangles.

Rasterizing a smart object can be very destructive, this solution is for simple smart object such as rectangles.

Smart objects can't be cropped as explained by @Scott, however, I'd like to share the way I do it for simple smart objects (such as rectangles I use for coloured backgrounds):

  1. Make sure the smart object is in it's own layer.
  2. Duplicate the layer and turn off visibility of the original layer to preserve your smart object.
  3. Right-click on smart object layer > Rasterize Layer (this will convert the smart object into a regular one).
  4. Now follow @Scott's answer (Image > Crop).

Your former smart object is now cropped! If you want to turn the object back to be an smart object:

  1. Right-click on the layer > Convert to Smart Object
3
  • 2
    In many, many instances you do not want to rasterize a smart object. This is really only a viable work path if the contents of teh Smart Object are already raster in nature and a single layer -- otherwise this is a very destructive workflow. Converting things back to a SO is irrelevant because by that time the damage has been done.
    – Scott
    Commented Sep 10, 2020 at 16:27
  • Added a note to my response, so is clear that this solution is only for simple smart objects. Thanks Commented Sep 10, 2020 at 18:22
  • 1
    As @Scott said, this is a very destructive suggestion. I have edited your instructions to first duplicate the smart object layer, hide one version, and modify the second version. Then you will always have the original to go back to.
    – Alith7
    Commented Sep 10, 2020 at 20:56
0

Ctrl + A, Ctrl + J, then delete the original layer.

0

I think I found just the perfect way to go around it:

Press ctrl+A; this makes a selection of everything on the canvas. Then choose image → trim, and you will be good to go.

-1

Right click on the layer that is larger then our canvas, then select "rasterize". After that do a select all to select your whole canvas then "image > Crop". Now if you try to "transform" that layer it should should only be as wide as your canvas.

I was working on 18x12 posters and the images I was enlarging were hanging way over the canvas and would not crop because they were imported as vector images.

Good luck. Steve

Not the answer you're looking for? Browse other questions tagged or ask your own question.