Loads a GDI+ image from a file.
C
LPVOID SftTabs_LoadGDIPlusImageFromFile(LPCTSTR lpszFilename);
lpszFilename
The fully-qualified path of the image file to be loaded. GDI+ supports common image formats including BMP, JPEG, GIF, PNG, and TIFF.
If successful, the return value is a Gdiplus::Image pointer or NULL if the function failed.
Loads a GDI+ image from a file.
This function is mainly intended for applications written using C. Because Gdiplus is C++ based, C applications don't readily have access to the Gdiplus::Image class and cannot use Bitmap::FromFile to load a GDI+ image. Using SftTabs_LoadGDIPlusImageFromFile even C applications can use GDI+ images, without needing access to GDI+ itself.
The application retains ownership of the Gdiplus::Image pointer returned by SftTabs_LoadGDIPlusImageFromFile. Once the image is no longer needed, it can be released using SftTabs_FreeGDIPlusImageLoadedFromFile, which frees the associated memory.
LoadGDIPlusImageFromFile provides essentially the same service as the GDI+ Bitmap::FromFile function.
See Also C/C++ API | C++ Classes | Notifications