Save As PNG script
Hello,
I'm trying to build a script (I don't know anything about coding in JavaScript) that grabs PSD from a folder and save them to PNG with color profile embedded, in a subfolder called PNG.
Like Image Processor does but for PNG.
I know you can do it with an action but I need more flexibility. I have tryied Image Processor Pro but do not give the option to set the compression.
Google can find a thread related to this argument but seams to be archived now.
https://forums.adobe.com/thread/1511528
Any help?
var inputFolder = Folder.selectDialog("Select a folder to process");
var fileList = inputFolder.getFiles("*.psd");
pngOptions = new PNGSaveOptions()
pngOptions.compression = 0
pngOptions.interlaced = false
savePath = File(originalDoc.path + "/" + originalDoc.name.replace(/\.[^\.]+$/, '.png'));
newDoc.saveAs(savePath, pngOptions, false, Extension.LOWERCASE)
newDoc.close()
app.activeDocument=originalDoc
