IM Lua 5 Binding
[Utilities]
Detailed Description
- Binding for the Lua 5 scripting language. Works with versions 5.0 and 5.1.
Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio
Lua 5.1 Copyright (C) 1994-2005 Lua.org, PUC-Rio
R. Ierusalimschy, L. H. de Figueiredo & W. Celes
http://www.lua.org
- The name of the functions were changed because of the namespace "im" and because of the object orientation.
As a general rule use:All the objects are garbage collected by the Lua garbage collector.imXxx -> im.Xxx IM_XXX -> im.XXX imFileXXX(ifile,... -> ifile:XXX(... imImageXXX(image,... -> image:XXX(...
- See imlua.h
Functions | |
int | imlua_open (lua_State *L) |
int | imlua_open_capture (lua_State *L) |
int | imlua_open_process (lua_State *L) |
int | imlua_open_fftw (lua_State *L) |
int | imlua_open_cd (lua_State *L) |
Function Documentation
|
Initializes the Lua binding of the main IM library. |
|
Initializes the Lua binding of the capture library. |
|
Initializes the Lua binding of the process library. |
|
Initializes the Lua binding of the fourier transform library. |
|
Initializes the Lua binding of addicional functions for the CD library. The following functions are defined: bitmap:imImageCreate() -> image: imImage [in Lua 5] Creates an imImage from a cdBitmap.
image:cdCreateBitmap() -> bitmap: cdBitmap [in Lua 5] Creates a cdBitmap from an imImage. The imImage must be a bitmap image, see \ref imImageIsBitmap.
image:cdInitBitmap() -> bitmap: cdBitmap [in Lua 5] Creates a cdBitmap from an imImage, but reuses image data. When the cdBitmap is destroyed, the data is preserved.
image:cdCanvasPutImageRect(canvas: cdCanvas, x: number, y: number, w: number, h: number, xmin: number, xmax: number, ymin: number, ymax: number) [in Lua 5] Draws the imImage into the given cdCanvas. The imImage must be a bitmap image, see \ref imImageIsBitmap.
image:wdCanvasPutImageRect(canvas: cdCanvas, x: number, y: number, w: number, h: number, xmin: number, xmax: number, ymin: number, ymax: number) [in Lua 5] Draws the imImage into the given cdCanvas using world coordinates. The imImage must be a bitmap image, see \ref imImageIsBitmap.
image:cdCanvasGetImage(canvas: cdCanvas, x: number, y: number) [in Lua 5] Retrieve the imImage data from the given cdCanvas. The imImage must be a IM_RGB/IM_BYTE image.
image:cdCreateCanvas([res: number]) -> canvas: cdCanvas [in Lua 5] Creates a cdCanvas using the CD_IMAGERGB driver. Resolution is optional, default is 3.8 pixels per milimiter (96.52 DPI). The imImage must be a IM_RGB/IM_BYTE image. |