Saves the displayed image using the filename specified.
Image Edit control
object.SaveAs Image[,FileType,PageType,CompressionType,CompressionInfo,SaveAtZoom]
Parameter | Data Type | Setting |
Image | String | The name of the image file being saved |
FileType | Integer | The FileType the image is being saved as |
PageType | Integer | The PageType the image is being saved as |
CompressionType | Integer | The CompressionType at which the image is being saved |
CompressionInfo | Integer | The CompressionInfo setting of the image being saved |
SaveAtZoom | Boolean | Whether the image is being saved using the current or original scale percentage value: True -- The image is being saved using the current scale percentage value |
Setting | Description |
1 | TIFF |
2 | AWD |
3 | BMP |
4 | PCX (read-only) |
5 | DCX (read-only) |
6 | JPG (read-only) |
7 | XIF (read-only) |
Displayed file types of DCX, PCX, JPG, or XIF must be saved using a FileType setting of 1 (TIFF), 2 (AWD), or 3 (BMP).
If a multipage image file (AWD, DCX, TIFF, or XIF) is saved as a BMP file, only the page currently being displayed is saved to the new file.
The valid PageType settings for the SaveAs method depend on the FileType setting entered. The following list shows the valid PageType settings:
Setting | Description | Prerequisite FileType |
1 | Black-and-white | 1 – TIFF, or |
2 | Gray4 | 1 -- TIFF |
3 | Gray8 | 1 -- TIFF |
4 | Palettized4 | 1 -- TIFF or |
5 | Palettized8 | 1 -- TIFF or |
6 | RGB24 | 1 -- TIFF |
7 | BGR24 | 3 -- BMP |
To use a PageType setting of 4 (Palettized4), the displayed image must already be a Palettized4 image.
Setting | Description |
1 | No compression |
2 | Group3(1D) |
3 | Group3(Modified Huffman) |
4 | PackBits |
5 | Group4(2D) |
6 | JPEG |
7 | RBA |
8 | Group3(2D) (read only) |
9 | LZW (read only) |
BMP files must be saved using a CompressionType setting of 1.
JPG files must be saved using a CompressionType setting of 6.
Setting | Description |
0 | No compression -- If CompressionType is set to 1 (no compression) |
1 | EOL |
2 | Packed Lines |
4 | Prefixed EOL |
8 | Compressed LTR |
16 | Expand LTR |
32 | Negate |
64 | High Compression/High Quality (JPEG compression only) |
128 | High Compression/Medium Quality (JPEG compression only) |
256 | High Compression/Low Quality (JPEG compression only) |
512 | Medium Compression/High Quality (JPEG compression only) |
1024 | Medium Compression/Medium Quality (JPEG compression only) |
2048 | Medium Compression/Low Quality (JPEG compression only) |
4096 | Low Compression/High Quality (JPEG compression only) |
8192 | Low Compression/Medium Quality (JPEG compression only) |
16384 | Low Compression/Low Quality (JPEG compression only) |
BMP and other uncompressed files must be saved using a CompressionInfo setting of 0.
None
The Display method must be invoked prior to calling this method.
The SaveAs method saves the image using the filename specified in the Image parameter. If the file already exists, it is overwritten.
Upon successful completion of the SaveAs method, the image display window continues to display the original image; the Image property value remains unchanged. Continuing to display the original image ensures that the image on display is the same as the image specified in the Image property. For example, assume the currently displayed image is payroll.tif and the value of the Image property is also payroll.tif. When the SaveAs method is invoked with its Image parameter set to payroll96.tif, the image is saved as payroll96.tif. The image display window continues to display payroll.tif, and the Image property value remains unchanged at payroll.tif.
If a multipage image file (AWD, DCX, TIFF, or XIF) is saved as a file type that does not support multipage image files (for example, BMP), only the page currently being displayed is saved to the new file.
For the TIFF file type, annotations are saved as annotation data. For all other file types, annotations are lost unless the BurnInAnnotations method is invoked prior to calling the SaveAs method. The BurnInAnnotations method burns annotations onto an image, causing them to be permanently incorporated into the image.
If the FileType parameter is not entered, the SaveAs method uses the original FileType setting of the image as a default. If the original FileType setting cannot be determined or is read-only, the method saves the image as a TIFF file. (For example, the SaveAs method saves a XIF file as a TIFF file.)
If the PageType and FileType parameters are not entered, the SaveAs method uses the original PageType setting of the image as a default. However, if a FileType is entered, the SaveAs method uses a PageType default setting that is associated with the FileType setting of the image. The following list describes the default PageType settings:
FileType Setting | Default PageType Setting |
1 -- TIFF | PageType setting of the displayed image |
3 -- BMP | PageType setting of the displayed image |
If the CompressionType parameter is Group3(2D), the SaveAs method saves the image using the Group4(2D) compression type. If the CompressionType parameter is LZW, the SaveAs method saves the image using no compression.
If the CompressionType parameter is not entered, the SaveAs method uses a default CompressionType setting that is associated with the FileType and PageType settings of the image. The following list describes the default CompressionType settings:
FileType Setting | PageType Setting | Default CompressionType Setting |
3 -- BMP | 1,5,7 -- All supported PageTypes | 1 -- No compression |
1 -- TIFF | 1 -- Black-and-white | 2 -- Group3(1D) |
1 -- TIFF | 2 -- Gray4 | 1 -- No compression |
1 -- TIFF | 3 -- Gray8 | 6 -- JPEG |
1 -- TIFF | 4 -- Palettized4 | 1 -- No compression |
1 -- TIFF | 5 -- Palettized8 | 1 -- No compression |
1 -- TIFF | 6 -- RGB24 | 6 -- JPEG |
Note: To use a PageType setting of 4 (Palettized4), the displayed image must already be a Palettized4 image.
If the CompressionInfo parameter is not entered, the SaveAs method uses a default CompressionInfo setting that is associated with the CompressionType setting of the image. The following list describes the default CompressionInfo settings:
CompressionType Setting | CompressionInfo Default Setting |
1 -- No compression | 0 -- No compression |
2 -- Group3(1D) | 8 -- Compressed LTR, |
3 --Group3(Modified Huffman) | 8 -- Compressed LTR and |
4 -- PackBits | 16 -- Expand LTR |
5 -- Group4(2D) | 2 -- Packed Lines, |
6 -- JPEG | 1024 -- Medium Compression/Medium Quality |
When a CompressionInfo value of 0 is entered with the CompressionType parameter set to 1 (no compression), the file is saved using no compression.
When a CompressionInfo value of 0 is entered with the CompressionType parameter set to a value other than 1, the file is saved using the default CompressionInfo parameter settings that correspond to the setting of the CompressionType parameter (as explained in the preceding list).
For example, if the end user specifies a CompressionType value of 1 (no compression) and then a CompressionInfo value of 0, the file is saved using no compression. If the end user specifies a CompressionType value of 2 (Group3[1D]) and then a CompressionInfo value of 0, the file is saved using the default CompressionInfo values for Group3(1D):
8 -- Compressed LTR,
16 -- Expand LTR,
1 -- EOL, and
4 -- Prefixed EOL
If the SaveAtZoom parameter is not specified, the image is saved using the original zoom scale percentage value.
BurnInAnnotations method
Compression topics in Imaging Concepts
CompressionInfo property
CompressionType property
Close event
Display method
Display topics in Imaging Concepts
FileType property
Image property
Image topics in Imaging Concepts
ImageModified property
PageType property
Save method