Syntax
Document.SaveFile ( FilePath, FileFormat, AutoStretch[, SizeFormat, CompressionType ])
Parameters
String FilePath - specifies the name of the image file to be written
ImageFormatType FileFormat - specifies the format of the file to be written
mxSBIGType3 (0) : "Type 3" format used by most SBIG cameras
mxSBIGST4 (1) : data format used by the SBIG ST4 camera
mxPCLynxx (2) : data format used by the PC-Lynxx camera
mxFITS (3) : FITS (Flexible Image Transport System), the format adopted by the astronomical community for data interchange and archival storage
mxRAW (4) : "Raw" format, a simple array of XSize by YSize pixels stored in row-major order with no header
mxTIFF (5) : TIFF (Tagged Image File Format), commonly used by scanners and raster image manipulation ("paint") progams
mxJPEG (6) : JPEG (named for the Joint Photographic Experts Group comittee which formulated this standard), a ubiquitous lossy image compression format
mxPNG (7) : PNG (Portable Network Graphics), a portable, patent-free, lossless compressed image format
mxBMP (8) : BMP, a standard format used by Windows to store device- and application-independent images
Boolean AutoStretch - specifies whether an automatic stretch of the image can occur during the save operation
PixelDataFormatType SizeFormat - [optional] specifies how pixels are represented
mx8BitPF (0) : each pixel occupies 8 bits (1 byte, 256 levels)
mx16BitPF (1) : each pixel occupies 16 bits (2 bytes, 65536 levels)
mx32BitPF (2) : each pixel occupies 32 bits (4 bytes, more than four billion levels)
mxFloatPF (3) : each pixel is stored in four bytes in IEEE floating point format
Short CompressionType - [optional] specifies whether the image should be compressed or not
Returns
Nothing
Remarks
Saves an image into the file specified by the string FilePath. This parameter should include the complete path (drive letter and directory) specification, as well as the filename and its extension. The file format used is set by parameter FileFormat, not by the file extension. For the FITS, RAW, and TIFF formats, parameter SizeFormat must specify the desired pixel data format; this parameter is ignored and may be omitted for other file formats.
If any pixel in the image exceeds the range that the format is capable of storing, and the AutoStretch parameter is True, MaxIm DL will automatically scale the entire image using the current screen stretch settings before writing the file. Images which do not exceed the file format's maximum pixel value are not subject to AutoStretch.
SBIG Type 3, FITS, TIFF, and JPEG formats provide for image compression in various ways. Except as noted below, set CompressionType to one (1) to enable compression or zero (0) to disable it.
FITS compression saves disk space but is not standard and should not be used if the file must be accessed using software other than MaxIm DL.
For TIFF files, only the PackBits compression method is available.
For JPEG files, values of the CompressionType parameter between 10 and 100 are interpreted as the JPEG Quality, i.e., higher values correspond to lower compression. For historical reasons, 0 is treated as the same as 25 (quite high compression/low quality) and 1 as 85 (quite low compression/high quality), but these values are deprecated.
Note that although SaveFile will write RAW format, the OpenFile method cannot read these. (Raw files can be read by MaxIm DL's Open command.)
This method is equivalent to the Save As command.