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

Photoshop scripting, export to png?

$
0
0

I use the following code:

 

function SavePNG(saveFile){

  var opts = new ExportOptionsSaveForWeb();

  opts.format = SaveDocumentType.PNG;

  opts.PNGB = true;

  opts.quality = 100;

  pngFile = new File(saveFile);

  opts.includeProfile = true;

  app.activeDocument.exportDocument(pngFile, ExportType.SAVEFORWEB, opts);

}

 

It almost workable, but it works with fully visible or fully invisible areas only. For example if I have a transparent layer and add a second transparent layer with a red rect with opacity 50%, then I will got an image where the transparency of this rect is 100% (fully visible).

 

How to solve this problem? I use Photoshop CS6 (Mac OS version).


Viewing all articles
Browse latest Browse all 74445

Trending Articles



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