IupLoadImage

Definition: include pGUI.e

Ihandln ih = IupLoadImage(string filename)
Description: filename: Name of the file to be loaded.

Returns: the identifier of the created image, or NULL if an error occurs. When it fails the global attribute "IUPIM_LASTERROR" is set with a message describing the error.
Auxillary Functions Native Handle to imImage
imImage result = IupGetNativeHandleImage(atom handle)

handle: image native handle, ie:
In Win32 is a HANDLE of a DIB.
In GTK is a GdkPixbuf*.
In Motif is a Pixmap.
Its memory is released after the imImage is created.

Returns: the imImage handle. Useful when pasting data from an IupClipboard.

imImage to Native Handle
atom result = IupGetImageNativeHandle(imImage image)

image: the imImage handle. Must be a bitmap image.

Returns: the image native handle, ie:
In Win32 is a HANDLE for a DIB.
In GTK is a GdkPixbuf*.
In Motif is a Pixmap.
Usefull when copying data to a IupClipboard.

imImage to IupImage (since 3.10)
Ihandle ih = IupImageFromImImage(imImage image)

image: the imImage handle. Must be a bitmap image.

Returns: the IupImage handle.

object res = IupSaveImage(Ihandle ih, string file_name, string fmt)

ih: handle of the IupImage.
file_name: Name of the file to be loaded.
format: format descriptor for IM. For example: "BMP", "JPEG", "GIF", "TIFF", "PNG", "PNM", "PCX", "ICO", etc.

Returns: 1 on success, otherwise a string message describing the error.