In order to crop to a specific layer there are three different methods that I would use:
Duplicate the desired layer to a new file by Right Clicking on the layer in the Layers Panel, selecting
Duplicate Layer
, changing the document toNew
. Once you go into the new document you can selectImage > Trim
, and selectBased on Transparent Pixels
(keep everything checked forTrim Away
. (you can do this in the same file as well, but it does require you to hide all other layers, which can be exhaustive.)Another solution is to do the Ctrl+Click trick on the layer, specifically on the thumbnail of that layer. Then just go to
EditImage > Crop
. This is the quickest way to do it, but you have to make sure layers behind the object are hidden. If you set your Crop Tool to a keyboard shortcut then it's really just a quick Click and Keyboard Shortcut and you're done.The last possibility is a special trick I use for any items that are all the same size. For example if I have a mobile device screen that I want to save as an image without the environment displayed around it. You can make a rectangle shape overlaid on top of the screen and quickly do the same Ctrl+Click on the layer thumbnail and Ctrl+C afterwards. The rectangle shape layer ends up being a tool but doesn't contribute to the visuals themselves, so make sure that layer has 0% transparency or is just simply hidden at the time of the cropping.