Quantcast
Channel: Adobe Community : Unanswered Discussions - Photoshop
Viewing all articles
Browse latest Browse all 74445

How can I get the script Export Layers to Files to export compressed pngs?

$
0
0

I would love to be able to take advantage of Photoshop's compressed png when using the script Export Layers to Files. I there a way I could modify the script to do this?

 

TIA!!!

 

========================

I found it ... I needed to add a line to the pngSaveOptions (around line #886) ...

 

            var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".png");

            pngSaveOptions = new PNGSaveOptions();

            pngSaveOptions.interlaced = false;

            // trying to compress png files

            pngSaveOptions.compression = 9;

            docRef.saveAs(saveFile, pngSaveOptions, true, Extension.LOWERCASE);

            break;

 

=========================


Viewing all articles
Browse latest Browse all 74445

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>