- Viewing Photoshop CS2 objects, commands, and methods
- Creating new objects in a script
- Setting the active object
- Opening a document
- Saving a document
- Setting application preferences
- Suppressing dialog boxes
- Working with the Adobe Photoshop CS2 Object Model
- Working with color objects
- Working with filters
- Understanding clipboard interaction
- Working with units
- Sample workflow automation JavaScripts
- Advanced scripting
Saving a document
Options for saving documents in Adobe Photoshop CS2 are illustrated below. To find out which properties you can specify for a specific file format save option, look up the object that begins with the file format name. For example, to find out about properties for saving an .eps file, look up EPSSaveOptions in Part 2 of this book.
The following script saves a document as a .jpeg file:
jpgFile = new File( "/Temp001.jpeg" ) jpgSaveOptions = new JPEGSaveOptions() jpgSaveOptions.embedColorProfile = true jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE jpgSaveOptions.matte = MatteType.NONE jpgSaveOptions.quality = 1 app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true, Extension.LOWERCASE)