Mobile app version of vmapp.org
Login or Join
Caterina889

: Export photoshop layers programatically to individual pngs of different sizes Hi there I'm trying to export all of the layers in my .psd to .pngs/.jpegs and I am having trouble exporting them

@Caterina889

Posted in: #AdobePhotoshop #Export #Layers #Png

Hi there I'm trying to export all of the layers in my .psd to .pngs/.jpegs and I am having trouble exporting them so that the sizes of the individual .pngs are the size of the image they contain.

I have seen this thread which has a script that almost does this but since I'm a new user here I can't comment on it...if the creator of that script (Johannes) could respond i would be very grateful.

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Caterina889

5 Comments

Sorted by latest first Latest Oldest Best

 

@Shakeerah625

Have you considered using Generator and writing something to export assets programatically? github.com/adobe-photoshop/generator-assets/wiki/Generate-Web-Assets-Functional-Spec

If you need a user interface, you can try out the Extract Assets dialog in the new version of Photoshop.

10% popularity Vote Up Vote Down


 

@Shelton719

Use this script below to save each layer into files. When you save them in seperate files you can create an action which makes the Image -> Trim move to cut the layers transparent pixels which you don't need for every file.

You can download the script from here.

10% popularity Vote Up Vote Down


 

@Voss6371140

I ended up using slicy. it works very well: just had to write a script to create the folders so that slicy can read the psd correctly

10% popularity Vote Up Vote Down


 

@Sherry646

Have you heard of macrabbit.com/slicy/? I started using this and it makes it extremely easy to export all layers as .png or .jpg. with one click. From what I remember it makes the .png the same size as the image it contains. Might be worth looking into. It's made life easier for me.

10% popularity Vote Up Vote Down


 

@Jennifer810

You can create an Action to do this if you have a lot of layers to save. Regardless, here's what you do:


Click on the layer in the layers palette and go under Layer > Duplicate Layer (you can also right click for this).
In the dialog box that pops up, look at the bottom where it says Destination and select "New" from the drop down menu. This duplicates the layer in a new document.
If the background of the new document is transparent, go to Image > Trim. Select transparent pixels and trim away top, bottom, left, right.


If the image had a background color, hide or delete that layer, then follow the step above. Then save the new document and then save for web.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme