2 Replies Latest reply on Aug 18, 2010 10:10 AM by Peter Celuch

    PNGSaveOptions NOT working

    Peter Celuch Level 4

      Hi, I'm trying to save as PNG8 without transparency and with white background. I've searched forums and found one funcion, repeating over and over again in all posts, using various properties on class PNGSaveOptions which, according to ESTK help has no properties (!!!)


      I changed PNG8 from false to true. Nothing changed! I changed whole bunch of properties and script keeps saving transparent PNG24, PNGSaveOptions are totaly ignored. Is it some kind of "feature" of CS5 or am I missing someting?


      Please, humor me and try to use this function for PNG export:


      function SavePNG(saveFile){
           pngSaveOptions = new PNGSaveOptions();
           pngSaveOptions.embedColorProfile = true;
           pngSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
           pngSaveOptions.matte = MatteType.WHITE;
           pngSaveOptions.quality = 1;
           pngSaveOptions.PNG8 = true;
           pngSaveOptions.transparency = false;
           activeDocument.saveAs(saveFile, pngSaveOptions, true, Extension.LOWERCASE);