Photoshop how to crop a picture within a layer (initial bounding rectangle is empty error)


Original posts: Photoshop: Select item and crop it directly

I tried asking on the original post, but it says I need 50 comments or participations to post a comment. Sorry for the confusion.

I was trying the method below from Alan G in the original post:

If you're asking about cropping an individual object on a layer, then no, there's not a direct way to do that. Photoshop crops the entire canvas, not individual layers. There are indirect ways, though, both of which you can make into a one-click Action.

Method 1:

Ctl-click on the layer thumbnail in the Layers Panel to create a selection of just that >object.

Click the Layer Mask icon at the bottom of the Layers Panel to create a mask that reveals >only the object.

Unlock the mask from the layer (click the chain-link icon between the thumbnail and the mask.

With the mask selected (not the pixel layer), press Ctl-T to enter free transform mode.

Your free transform will now act like a crop mask for the layer.

One time it worked. Every time I try it again I get an error: "Could not transform because the initial bounding rectangle is empty". What am I missing?

4/13/2017 12:46:00 PM

Maybe this is too simple but it looks like you can simply do a layer mask with the rectangle tool.

1) Use the rectangle tool and trace a rectangle or shape as you need.

Example selection for masking

2) Click on the "add a mask" button at the bottom of your layers. It should automatically fill (mask) in black all the zone outside your selected rectangle.

how to crop an image within a layer

3) Then you can simply "unlock" the layers from the mask by pressing the little link icon between them if you want to move around that rectangle.

If you want to resize it, select the layer mask and do a Command+T (free transform) and move as you need. You might need to fill back some zones on the outside edge if you shrink your layer mask.

If you need to fill back some of the zone on the outside edge, be careful to use the rectangle section tool and select OUTSIDE your canvas too before filling that shape with black; if you don't do that, you might end up with a thin gray line that won't be masked on the edge of your image!

Moving layer mask around on a layer Photoshop

4) If you want to "crop" it, you can get rid of the layer mask by dragging it in the trash icon on the layers window. When prompted about what you want to do with it, select "apply". But it's quite convenient to keep that mask for later if you don't have issue with file size and performance!

Also, very important to use the color black 100-100-100-100 in the CMYK color picker, and not any black. You will ensure that all the channels of color are 100% masked this way and there won't be any pale shades left.

Not sure if that's what you want to do with your image, but that's how to "crop" an image within a layer and not all the elements on the page.

If your mask is already well done and it says the selection is empty, maybe that's because you have already selected an element ON THE LAYER and not the mask! Make sure your mask is selected, not the layer. You can click on the layer mask and do a "select all" (Command+A) and it should select everything you have on it.

6/16/2015 10:10:00 PM