I have an icon like this:

enter image description here

It's on its own layer with a tranpsarent background, I duplicate it onto a new layer.

I can't remember how to fit a rectangular selection around it, so that it is just the right size, so I could then export it as a .png?

I also have a few icons like that, each on their own layer. How would I go about making them into a sprite image?

  • 3
    I believe cmd+click on the layer in the layers panel makes a selection that fits the layer
    – Cai
    Dec 28, 2015 at 13:24
  • 2
    CAI is correct. Or ctrl-click te layer thumb on Windows. In CC you can right-click a layer and export it directly.
    – PieBie
    Mar 27, 2016 at 15:30
  • galdikas, you should mark one of these as the correct answer or tell everyone why these two didn't work for you. Otherwise, you might never get additional answers. This question has been bumped to the front page by the community bot like 24 times (did a quick count from the edits). — There are definitely better answers to this question, but many people don't like tho answer questions that seem to be abandoned by the op. You never commented on the given answers saying why they didn't work for you so maybe they did... maybe they didn't... who knows.
    – Joonas
    May 21, 2018 at 7:37

2 Answers 2


Command–click to select the layer. Then select the crop tool (hit "C"). If the crop tool isn't the current tool, then it should crop to the selection. If it is the current tool simply pick something else, like the move tool (hit "V"), and then pick the crop tool again. Hit enter to crop the image. Hide the layers behind it, and hit save as. You'll need to use the history pallet to get back to your original state.

Doing it quickly it looks like this:

  1. Command-Click Layer
  2. V for the move tool
  3. C for the crop tool
  4. Enter to crop
  5. Hide any layers behind
  6. Command-shift-S to save as
  7. Use history to go back
  • Select the layer where the icon is.
  • Go to Select, then Load Selection.
  • Then copy it (either command-copy or control-copy).
  • Create a new Photoshop file.
  • Paste the icon in.
  • It should still be a smart object and you may resize as needed.
  • Then simply export as a png or whatever format you'd like.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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