Advertisement


Making PNG backgrounds black instead of transparent


Question

I'm working in Photoshop CS5.

I have 800+ layers in a PSD file with transparency in them, and I want to export them all individually to JPG (or PNG if possible) - I have this straightened out, but I want the background to be black, not white (black, not transparent for PNG).

Individually, I would create a background layer that is black and export the file as a JPG/PNG with a single layer + the background layer visible.

I can't do that for the amount of layers in this project.

Any ideas?

2016/04/06
1
0
4/6/2016 6:19:00 PM

Mark Edwards has a great scripted solution for this, posted to another question.

An automated, easy solution

  1. Use the File → Scripts → Export Layers to Files script. This will export each layer of your document as a separate file with a filename that matches the layer name (so ensure your layer names are correct before running the script). Make sure you use a lossless 24bit format, like PNG (with 8bit alpha).

  2. Delete the exported file that's the background layer. I assume you won't be needing it :)

  3. Copy the background layer to the clipboard.

  4. Create an action that pastes and reorders the layers so the pasted layer is in the background.

  5. Run the action on all the files you exported.

2017/04/13
1
4/13/2017 12:46:00 PM