Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

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

share|improve this question
    
Why do you want to keep the extra transparent areas? –  Joonas Nov 6 '11 at 14:36
add comment

2 Answers

(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.

Example

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.

share|improve this answer
add comment

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 :

app.activeDocument.trim(TrimType.TRANSPARENT);

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.