HeaderPane
Main
Hide
Share Link
Print

LoadGDIPlusImageFromFile

Loads a GDI+ image from a file.

C

LPVOID WINAPI SftBox_LoadGDIPlusImageFromFile(LPCTSTR lpszFilename);

C++

static LPVOID CSftBox::LoadGDIPlusImageFromFile(LPCTSTR lpszFilename);

Parameters

lpszFilename

The path and name of the image file to load.

Returns

If successful, the return value is a Gdiplus::Image pointer. NULL is returned if GDI+ is not available or the file cannot be loaded or decoded.

Comments

The LoadGDIPlusImageFromFile function 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 Image::FromFile to load a GDI+ image. Using SftBox_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 SftBox_LoadGDIPlusImageFromFile. Once the image is no longer needed, it can be released using SftBox_FreeGDIPlusImageLoadedFromFile, which frees the associated memory.

LoadGDIPlusImageFromFile provides essentially the same service as the GDI+ Image::FromFile function.

See Also C/C++ API | Categories | Notifications


Last Updated 11/21/2026 - (email)
© 2026 Softel vdm, Inc.