ImageGear for C and C++ on Windows v20.5 - Updated
IG_load_thumbnail_W
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Load Functions > IG_load_thumbnail_W

This function loads a thumbnail (if one exists in the file) from file lpszFileName, and returns the HIGEAR handle of the resulting image to the HIGEAR object pointed to by argument lphIGear.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_load_thumbnail_W(
   const LPAT_WCHAR lpwszFileName,
   LPHIGEAR lphIGear
);

Arguments:

Name Type Description
lpwszFileName const LPAT_WCHAR Name of file, specified as a wide string (UTF-16).
lphIGear LPHIGEAR Pointer to HIGEAR variable to receive handle.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

GUI Windows

Example:

 
Copy Code
HIGEAR hIGear = 0;        //handle for thumbnail
AT_ERRCOUNT nErrcount;    // to test for errors

// Load image, and obtain its HIGEAR handle:
nErrcount = IG_load_thumbnail_W(L"picture.bmp", &hIGear); 
//...

// Destroy the image
if(IG_image_is_valid(hIGear))
{
    IG_image_delete(hIGear);
}

Is this page helpful?
Yes No
Thanks for your feedback.