2 Replies Latest reply on Mar 18, 2010 7:25 AM by StuartLevesque

    Script Help please. Need to save as different filetype.

    StuartLevesque Level 1

      I have a script that is currently saving files as jpgs.  I need it to save as a png.  Would someone be able to help me with this?

       

       

      var doc = app.activeDocument;

       

      var Path = doc.path;

       

      var Name = doc.name.replace(/\.[^\.]+$/, ''); var Suffix = "_full_l"; var saveFile = File(Path + "/" + "full_l" + ".jpg"); SaveJPEG(saveFile, 8);

       

      function SaveJPEG(saveFile, jpegQuality){ jpgSaveOptions = new JPEGSaveOptions(); jpgSaveOptions.embedColorProfile = true; jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE; jpgSaveOptions.matte = MatteType.NONE; jpgSaveOptions.quality = jpegQuality; activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE); }