ImageGear Professional v18.2 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Filter Functions > IG_fltr_load_file_W |
This function loads an image from the specified file into memory and creates a HIGEAR handle for this image.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_fltr_load_file_W(
const LPAT_WCHAR lpwszFileName,
UINT nPage,
LPHIGEAR lphIGear
);
|
Name | Type | Description |
lpwszFileName | const LPAT_WCHAR | Path and name of the file to load, specified as a wide string (UTF-16). The path can be absolute or relative. |
nPage | UINT | Page number to load if this is a multi-page file. Note that page numbers begin at 1, not 0. Set nPage to 1 if this is not a multi-page file. |
lphIGear | LPHIGEAR | Pointer to the HIGEAR object in which to return the ImageGear handle of the image. |
All pixel formats supported by ImageGear Professional.
GUI Windows
Copy Code
|
|
---|---|
HIGEAR hIGear; // Will hold handle returned by IG_fltr_load_file AT_ERRCOUNT nErrCount; // Count of errs on stack upon ret from func*/ // Load the selected image nErrCount = IG_fltr_load_file_W(L"picture.tif", 1, &hIGear); if(nErrCount == 0) { // ... // Delete the image IG_image_delete(hIGear); } |
The handle that ImageGear assigns for this image is returned in the hIGear argument. The file named by wcFileName may be in any format recognized by ImageGear. The function will determine the format by inspecting the file's header section.
|
See also the section Getting Information about a File Format Filter.
This function may work slower on PDF and PostScript images, compared to its ANSI analog IG_fltr_load_file. |