Sub topic 3
Saving PNG: lossless compression and transparency
This chapter assumes you know the Photoshop workspace, what pixels are, and how layers stack. It covers PNG output, then the wider format choices for color, export, delivery, scripting, and cloud storage.
Saving PNG
PNG uses lossless compression. Every pixel value survives the save, and reopening the file gives back the same image. PNG also keeps alpha transparency, so areas with no paint stay see-through in the browser or in another app.
To save: choose File > Save As, then pick PNG. Leave Interlaced off unless you need a progressive load on slow connections.
Compression and transparency
- Lossless: no quality slider, and repeated saves do not degrade the image.
- Transparency: only the pixels you have not painted remain see-through.
- Flattening: PNG does not keep layers, so flatten or export a copy.
Color mode, profiles, and bit depth across formats
| Format | Layers | Transparency | Compression | Typical bit depth |
|---|---|---|---|---|
| PSD | Kept | Kept | Optional, lossless | 8, 16, or 32 bit |
| JPEG | Lost (flattened) | Not supported | Lossy | 8 bit |
| PNG | Lost (flattened) | Kept | Lossless | 8 or 16 bit |
Embedded color profiles travel with PSD, JPEG, and PNG when the save options include them. Convert to sRGB before web export, because browsers assume sRGB.
Export As and web delivery
Choose File > Export > Export As when you need several sizes or formats from one document. You set the scale, the format, and the metadata option, which can keep copyright data, keep all metadata, or remove it. Removing metadata reduces file size and hides location or camera data.
Choosing a format
- Editing master: PSD.
- Photo for the web: JPEG at a quality setting that balances size and detail.
- Logo or icon with transparency: PNG.
Automating with ExtendScript
This script saves the active document as a PNG copy on the desktop, so the open document stays unchanged.
var doc = app.activeDocument;
var pngOpts = new PNGSaveOptions();
pngOpts.interlaced = false;
var target = new File(Folder.desktop + "/logo.png");
doc.saveAs(target, pngOpts, true, Extension.LOWERCASE);Cloud documents
Cloud documents store the file in Adobe cloud storage and sync it across devices, with version history. A local PSD stays on your disk. Export a PSD or flattened copy before sending work to tools that cannot open cloud documents.
Exercise
Exercise
You need a logo with a transparent background for a website. Which format and save option do you choose, and why?
Show answer
Save as PNG with transparency kept. PNG is lossless and supports alpha, so the background stays clear. Keep the PSD master for later edits.