Hi,
When i set the pngOpts.quality tot 50, it seems to do nothing. What can i do to change the quality and so decrease the file size?
this is my save function
Code: Select allfunction SavePNG(saveFile){
var pngOpts = new ExportOptionsSaveForWeb;
pngOpts.format = SaveDocumentType.PNG
pngOpts.PNG8 = false;
pngOpts.transparency = true;
pngOpts.interlaced = false;
pngOpts.quality = 2;
activeDocument.exportDocument(new File(saveFile),ExportType.SAVEFORWEB,pngOpts);
}
pngOpts.quality does not effect file size
pngOpts.quality does not effect file size
The quality property in ExportOptionsSaveForWeb is only used when exporting jpeg.
PNG compression is new to CS6( unless you have a third party plug-in ). I don't think the scripting DOM has been updated to support PNG compression in ExportOptionsSaveForWeb. There is a new property in the PGNSaveOptions for use with the saveAs method.
My guess is you will need to either use saveAs with the new options or use scriptlistener to exportDocument a PNG with compression.
PNG compression is new to CS6( unless you have a third party plug-in ). I don't think the scripting DOM has been updated to support PNG compression in ExportOptionsSaveForWeb. There is a new property in the PGNSaveOptions for use with the saveAs method.
My guess is you will need to either use saveAs with the new options or use scriptlistener to exportDocument a PNG with compression.
pngOpts.quality does not effect file size
Thanks for your reply.
Let me get this straight. In cs6 it is possible, everything below it's not possible. Unless i have a third party plugin which listens to my script so it can apply compression on saving?
Do you have any axample of a third party plugin and how i can use this in combination with my/a script?
*edit*
found a plugin called SuperPNG (http://www.creativebloq.com/photoshop/b ... ins-912722 ... ins-912722)
Is that any good?
Let me get this straight. In cs6 it is possible, everything below it's not possible. Unless i have a third party plugin which listens to my script so it can apply compression on saving?
Do you have any axample of a third party plugin and how i can use this in combination with my/a script?
*edit*
found a plugin called SuperPNG (http://www.creativebloq.com/photoshop/b ... ins-912722 ... ins-912722)
Is that any good?