This function is used to save the contents of an IMAGE type variable containing a DIB image as a bitmap file (".bmp" extension).
Note:
In Java/Web and Cloud version, the available file formats are restricted to BMP, PNG, JPG, TIFF and GIF formats.
TIFF format support requires Java 9 or later, or the installation of a third-party ImageIO plugin. Integrated support for TIFF and PNM formats is no longer available as the image library used (jai) is not compatible with Java 9.
Context
Windows client
Windows server
Java client
Java server
Adelia Web client
Adelia Cloud client
Event Adelia client
Parameters
IMAGE |
ImageVar |
IMAGE type variable. |
ALPHA(n) |
FileName |
Name of the bitmap result file. |
NUM_BIN_4 |
FileFormat |
Image format used to save the file: 0 BMP format, 1 PCX format, 2 PNG format, 3 PPM format, 4 PGM format, 5 PBM format, 6 JPEG format, 7 TGA format, 8 GIF format, 9 TIFF format, 13 MNG format, 18 JP2 format. |
NUM_BIN_2 |
ReturnCode |
Return code for the operation: -2 The IMAGE variable is empty. -1 Error while opening or writing file. 0 Internal error. 1 Operation completed successfully. |
Example
FileName = 'C:\Hardis.jpg'
FileFormat = 6
CALL_DLL 'VATOOLBX.DLL' 'VaToolBxSaveBitmapEx' ImageVar FileName FileFormat ReturnCode
List of the VaToolBx functions by topic