I'd like to know if this is possible with Photoshop CS4 :
- Select an item with Ctrl+T (on windows).
- Crop it directly, without selecting the item manually.
It is possible?
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
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 to
New. Once you go into the new document you can select
Image > Trim, and select
Based on Transparent Pixels (keep everything checked for
Trim 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
Image > 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.
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.
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.
Ctl-click the layer thumbnail as before to create the selection.
Convert the selection to a path (Paths panel flyout, "Make Work Path")
Create a vector mask:
Layer > Vector Mask > Current Path
Your path is now a vector mask that you can work with either using Free Transform or all the vector tools in the toolbox.
Uh - do you mean "scale the canvas to a particular item / selection group"? If so, I don't believe so.
If you have a single item on a single layer you can select it (Ctrl+a -> nudge left / right to snap the selection to the actual pixels), copy it (Ctrl+c), create a new file (Ctrl+n (canvas sized to clipboard contents)) and paste the selected item into it - that would create a new file that's the exact dimensions of the item you're trying to crop to.
I, too, have often wished for the ability to crop to a selection.
I created an action for something similar; I wanted to copy portions of an image with auto-trim, without constantly creating new documents (for example, a bunch of icons on a white background). Here's the action sequence:
Copy, New Document (Clipboard Preset), Paste, Flatten Image, Trim (Top-Left Pixel Color, All Sides), Select All, Copy, Close.
With this action saved, you can do everything in a single click or key press.
And old trick that may or may not work for you/on newer versions:
EDIT: 'doh! I just realize that's exactly what lawndartcatcher suggested. Give the upvote to that answer instead.