Options for saving a document in PNG format using the Document.saveAs method
https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/document/#saveas
const doc = app.activeDocument;const saveFile = await require('uxp').storage.localFileSystem.getFileForSaving("image.png");await doc.saveAs.png(saveFile, { compression: 6, interlaced: false}); Copy
const doc = app.activeDocument;const saveFile = await require('uxp').storage.localFileSystem.getFileForSaving("image.png");await doc.saveAs.png(saveFile, { compression: 6, interlaced: false});
objects/saveoptions
22.5
Optional
The compression value to be used when method = PNGMethod.QUICK
0...9
6 Copy
6
True to interlace rows when method = PNGMethod.QUICK
false Copy
false
PNG File Size optimization method.
Options for saving a document in PNG format using the Document.saveAs method
See
https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/document/#saveas
Example
Targetfolder
objects/saveoptions
Optionobject
Min Version
22.5