I have a psd that consists of around 50 layers and would like to export each layer into pngs.

I have tried the Export Layers as Files script in PS CS5, selecting the PNG format. I need all exported images to have the same dimensions. However, the script automaticallyremoves all the transparent background pixels that surround the artwork, thus the exported images have the height-width of the foreground artwork. The result is what I do not want: multiple sized images... Any way I can resolve the issue?

Thanks, Andreas

  • Why do you want to keep the extra transparent areas?
    – Joonas
    Commented Nov 6, 2011 at 14:36

2 Answers 2


If this is a one time thing, you could try exporting to PSD and then batch converting those PSD files to PNG format. The Export Layers script does not trim transparent areas when exporting to PSD.

If you need to do this a lot, you could try modifying the script (it's a Javascript BTW), so that it does not trim transparent pixels when you're exporting to PNG format.

I did a quick search of the script for any lines referencing transparency, and believe the line in question is :


It occurs twice; once for PNG-8 and once for PNG-24. You should get the script to do what you want by duplicating it, renaming it, and simply removing both instances of that line.


(Simple solution, guaranteed from CS5 and up) When exporting layers using the export layers script and choosing a PNG-format (be it 8-PNG or 24-PNG), you have the option to 'trim' the image.


By deselecting this option Photoshop will no longer trim the transparant edges and keep your original document sizes. I know this is a late response but I hope this may still help others with issues similar to those of OP.

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.