ImageGear Professional v18.2 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Save Functions > IG_save_file |
This function will store the image rectangle of the image referenced by hIGear to disk using the name lpszFilename.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_save_file(
HIGEAR hIGear,
const LPSTR lpszFileName,
AT_LMODE lFormatType
);
|
Name | Type | Description |
hIGear | HIGEAR | HIGEAR handle of image to save. |
lpszFileName | const LPSTR | Pointer to the filename (you may include path with filename) in which to save. |
lFormatType | AT_MODE | Specifies the format to use for saving, and also the compression scheme if applicable. See enumIGSaveFormats. |
lFormatType is used to set the format and compression (if applicable) of the output file. If you want to have ImageGear use the file extension provided in your filename string (lpszFilename) to determine the file format to save to, set lFormatType = IG_SAVE_UNKNOWN.
When an image is saved to a multi-page file format (for example, TIFF or DCX), if the file already exists then the new image is appended as a new page in the file. When an image is saved to a non-multi-page file format, if the file already exists it is simply overwritten; the previous version of the file is lost.
IG_fltr_save_file is an extended version of this function. It allows inserting or replacing pages in multi-page files.
Some file formats, such as TXT, JPEG, and others, may be saved with additional control, using IG_fltr_ctrl_get and IG_fltr_ctrl_set. See the description also in the section Using Format Filters API for Filter Control.