win32.graph.freeimage.FreeImage_Load

FreeImage_Load is available since version 1.0.

Prototype:

number FreeImage_Load(number format, string filename, number flags)

Parameters

format
Image format: FIF_UNKNOWN = -1, FIF_BMP = 0, FIF_ICO = 1, FIF_JPEG = 2, FIF_JNG = 3, FIF_KOALA = 4, FIF_LBM = 5, FIF_IFF = FIF_LBM, FIF_MNG = 6, FIF_PBM = 7, FIF_PBMRAW = 8, FIF_PCD = 9, FIF_PCX = 10, FIF_PGM = 11, FIF_PGMRAW = 12, FIF_PNG = 13, FIF_PPM = 14, FIF_PPMRAW = 15, FIF_RAS = 16, FIF_TARGA = 17, FIF_TIFF = 18, FIF_WBMP = 19, FIF_PSD = 20, FIF_CUT = 21, FIF_XBM = 22, FIF_XPM = 23, FIF_DDS = 24, FIF_GIF = 25, FIF_HDR = 26
filename
the image file name
flags
see FreeImage documentation for more info

Description:

This function decodes a bitmap, allocates memory for it and then returns it as a FIBITMAP. The first parameter defines the type of bitmap to be loaded. For example, when FIF_BMP is passed, a BMP file is loaded into memory (an overview of possible FREE_IMAGE_FORMAT constants is available in Table 1). The second parameter tells FreeImage the file it has to decode. The last parameter is used to change the behaviour or enable a feature in the bitmap plugin. Each plugin has its own set of parameter.

Return value:

Returns a new image handle if succeeded, or null if failed.