IupGLCanvas - controle

IUP - Portable User Interface

IupSaveImage

A function to save an IupImage to a file using the IM library. The function can save the formats: BMP, GIF, TIFF, PNG, PNM, PCX, ICO and others that support the IM_MAP color mode. For more information about the IM library see http://www.tecgraf.puc-rio.br/im.

Initialization and Usage

To generate an application that uses this function, the program must be linked to the function’s library (iupim.lib on Windows and libiupim.a on Unix). The iupim.h file must also be included in the source code.

To make the function available in Lua, use the initialization function in C, iupluaim_open, after calling iuplua_open. The iupluaim.h file must also be included in the source code. The program must be linked to the functions’s libraries (iupluaim.lib on Windows and libiupluaim.a on Unix).

Reference

int IupSaveImage(Ihandle* elem, const char* file_name, const char* format); [in C]
IupSaveImage{elem: iuplua_tag, file_name, format: string} -> (ret: number) [in IupLua3]
iup.SaveImage{elem: iuplua_tag, file_name, format: string} -> (ret: number) [in IupLua5]

elem: handle of the IupImage. file_name: Name of the file to be loaded.
format: format descriptor for IM.

This function returns zero if failed. When failed a message box describing the error is displayed.

See Also

IupImage