Adobe 23101335 - Photoshop - PC Manual page 55

Scripting guide
Hide thumbs Also See for 23101335 - Photoshop - PC:
Table of Contents

Advertisement

For example, you could use the Document object to get the active layer, save the current
document, then copy and paste within the active document or between different documents.
3.8.1 Saving documents and save options
Photoshop scripting support lets you work with various file formats. It is important to note,
however, that the Open and Save formats are not identical.
Also note that some formats available in scripting require you to install optional file formats.
The optional formats are:
Alias PIX
Electric Image
SGI RGB
Wavefront RLA
SoftImage
When using the save command there are a number of specifiable options. These options are
grouped by file type in the provided save options classes. Because the type and contents of the
file you are working on affects how it is saved, some of the option values may not always be
applicable. It also means that many of the option values do not have well defined default
values.
The best way to determine what values can or should be used for save is to perform a save
command from the user interface and then copy the value from the options dialog to your
script. You should perform a complete save operation because there can be multiple dialogs
presented before the document is saved. If you cancel one of the save dialogs without
completing the operation you could miss a dialog containing values needed in your script.
There are many objects that allow you to specify how you want to save your document. For
example, to save a file as a JPEG file, you would use the JPEG save options
( JPEGSaveOptions/JPEGSaveOptions ) class as shown below.
AS:
tell application "Adobe Photoshop 7.0"
end tell
Photoshop 7.0 Scripting Guide
make new document
set myOptions to {class:JPEG save options, ¬
embed color profile:false, format options: standard, ¬
matte: background color matte,}
save current document in file myFile as JPEG with options ¬
myOptions appending no extension without copying
Scripting Photoshop
Document object
3
55

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop 7.0

Table of Contents