Photoshop How to save selection to PNG
Solution 1:
- Make your selection
- Edit -> Copy Merged
- File -> New (Photoshop should automatically suggest a new canvas size to match the selection size)
- Edit -> Paste
- File -> Save As (PNG)
- Rinse and repeat... (keyboard shortcuts are handy here)
(Tested on Photoshop CS4)
Solution 2:
Try selecting the areas with the Slice tool and then File > Export for web & devices.
Solution 3:
I tackled this by creating a script that I put in Presets\Scripts\Export Selection to PNG.jsx
The code as follows:
app.displayDialogs = DialogModes.NO; var pngSaveOptions = new PNGSaveOptions(); pngSaveOptions.compression = 9; var hasSelection; var docRef; try { hasSelection = !!app.activeDocument.selection.bounds; } catch (err) { hasSelection = false; } if (hasSelection) { app.activeDocument.selection.copy(true); var w = app.activeDocument.selection.bounds[2]; var h = app.activeDocument.selection.bounds[3]; docRef = app.documents.add(w, h); docRef.paste(); } else { docRef = app.activeDocument; } var file = File.saveDialog("Export as PNG to..."); if (file && ((file.exists && confirm("Overwrite " + file +"?")) || !file.exists)) { docRef.saveAs(file, pngSaveOptions, !hasSelection, Extension.LOWERCASE); if (hasSelection) { docRef.close(SaveOptions.DONOTSAVECHANGES); } }
The script above will handle no-selection as a "select all" and checks if the target file exists confirming an overwrite.
This script is triggered from the File->Scripts->Export Selection to PNG