Hi, I have a Photoshop file at https://www.dropbox.com/s/0kr95lj5o43brze/daccr.psd?dl=0 When export it as PNG, using "File" -> "Export" -> "Quick Export as PNG-8", I will get a PNG of 16.7k. See https://www.dropbox.com/s/5xfrhmub6moj98q/daccr%28quick-export%29.png?dl=0 When using "File" -> "Export" -> "Export As" and set the output format as PNG and check "Smaller File(8-bit)", I will get the same result. However, when I using the following script to export the file into PNG format, var BoxshotFile = File("E:\\daccr.psd"); var BoxshotDoc = app.open(BoxshotFile); SaveForWebAsPNG (BoxshotDoc, "E:\\daccr(script).png", 100); // Save the PSD file BoxshotDoc.close(SaveOptions.SAVECHANGES); BoxshotFile.close(); function SaveForWebAsPNG(doc, filename, quality) { var outFile = new File(filename); if (outFile.exists) { outFile.remove(); } var sfwOptions = new ExportOptionsSaveForWeb(); sfwOptions.format = SaveDocumentType.PNG; sfwOptions.PNG8 = true; sfwOptions.transparency = true; sfwOptions.quality = quality; doc.exportDocument (outFile, ExportType.SAVEFORWEB, sfwOptions); } I will get a PNG file of size 21 kb. See https://www.dropbox.com/s/kucn5q97324icjq/daccr%28script%29.png?dl=0 Why the GUI operation and script will produce difference results?
... View more