ImgDoc_SaveInFile¶
imgDocRef | Text | The image document reference. |
filePath | Text | The destination file path. |
options | Object | Saving options. |
success | Longint | Completion status: 1 on success, 0 otherwise. |
Save the image document to a file.
Parameter imgDocRef
is the image document reference.
The full pathname of the destination file is specified in the destFilePath
parameter.
If omitted or set to an empty string, destFilePath
defaults to the pathname of the
document file. The pathname may be in either POSIX
(recommended) or System
format.
The optional parameter options
is a 4D object through which various saving options
can be specified:
Property name | Type | Default | Description |
---|---|---|---|
Format |
String |
The image doc’s original format. | The option’s value specifies the format to save in. The format must support encoding. When saving document containing more than one frame to a single-frame format
(anything but |
EmbedThumbnail |
Boolean |
False |
Set to The format must support embedded thumbnails. |
ApplyOrientation |
Boolean |
Depends on format. | By setting this to The default behavior depends on the value of the image orientation property, and also
on the destination format. If the destionation format supports the orientation
property, the default is |
Attach |
Boolean |
True |
Set to For a |
Property name | Type | Default | Description |
---|---|---|---|
LossyCompressionQuality |
Real |
0.75 |
Effective when saving to a lossy format, this option’s value is a real number in the
range of The higher this number is, the higher the quality of the saved image will be at the expense of larger file size. Lower numbers produce smaller files, at the expense of lower image quality. |
Recompress |
Boolean |
False |
The saving operation is optimized to avoid re-compression of lossy image data, when possible.
To force re-compression, set this to True . |
Property name | Type | Default | Description |
---|---|---|---|
TIFFMonochromeEncoding |
Longint |
kTIFFCompressionCCITTFax4 | The TIFF compression method for black and white images. Can be one of: kTIFFCompressionNone, kTIFFCompressionCCITTRLE, kTIFFCompressionCCITTFax3, kTIFFCompressionCCITTFax4. |
TIFFGrayscaleEncoding |
Longint |
kTIFFCompressionLZW | The TIFF compression method for grayscale images. Can be one of: kTIFFCompressionNone, kTIFFCompressionLZW, kTIFFCompressionDeflate. |
TIFFColorEncoding |
Longint |
kTIFFCompressionLZW | The TIFF compression method for color images. Can be one of: kTIFFCompressionNone, kTIFFCompressionLZW, kTIFFCompressionDeflate. |
Property name | Type | Default | Description |
---|---|---|---|
ProgressDelay |
Real |
1.0 |
The delay, in seconds, before the progress starts. |
ProgressCallback |
String |
"" |
The name of the project method that will be called with progress information. |
The progress callback method has the following signature:
ProgressCallback (event
; progress
): success
event |
Longint |
Progress event: 1 = start, 2 = update, 3 = end. |
progress |
Real |
Progress value: [0.0-1.0] , or -1 if indeterminate. |
success |
Longint |
Return # 0 to continue, or 0 to cancel. |
Note
This method is a convenience wrapper for the ImgDoc_SaveInFile_JSN
plug-in method.