In Photoshop CC, you can right click on a layer, and in the context menu, there will be an option, "Quick Export as PNG". This will make a PNG out of the current layer, but it has an issue: The new layer it makes will be the size of the document (way bigger then the image). Is there anyway to have Photoshop crop the new PNG to the exact size of the layer?
Well you could reopen the png and apply a trim on it.
You can aslo create following in a action:
- Make a new action, and record
- RMB on currently active layer, and choose Duplicate Layer...
- Set the Destination field to new
- Apply Image → Trim... on new image
- With transparent pixels setting
- Save your image
- Stop recording and make the save step have dialog on in the actions palette.
- (optional assign a hotkey to action)
Now you have a one click (or key) solution to a save dialog with a trimmed layer.
In Photoshop CS6, there is a Script in File Menu. I don't know whether it's included in CC or not. If it's there, then these steps can be followed...
Go to File Menu => Scripts => Export Layers to File
Select - File Type and Destination
Check Mark - Transparency | Interlaced | Trim Layers