IM: IM Lua 5 Binding

IM - An Imaging Tool

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:
    imXxx  -> im.Xxx
    IM_XXX -> im.XXX
    imFileXXX(ifile,... -> ifile:XXX(...
    imImageXXX(image,... -> image:XXX(...
All the objects are garbage collected by the Lua garbage collector.
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

int imlua_open lua_State *  L  ) 
 

Initializes the Lua binding of the main IM library.
You must link the application with the "imlua5" library.

int imlua_open_capture lua_State *  L  ) 
 

Initializes the Lua binding of the capture library.
You must link the application with the "imlua_capture5" library.

int imlua_open_process lua_State *  L  ) 
 

Initializes the Lua binding of the process library.
You must link the application with the "imlua_process5" library.

int imlua_open_fftw lua_State *  L  ) 
 

Initializes the Lua binding of the fourier transform library.
You must link the application with the "imlua_fftw5" library.

int imlua_open_cd lua_State *  L  ) 
 

Initializes the Lua binding of addicional functions for the CD library.
CD library is a 2D graphics library.
http://www.tecgraf.puc-rio.br/cd
You must link the application with the "imlua_cd5" 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 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:cdPutImageRect(x: number, y: number, w: number, h: number, xmin: number, xmax: number, ymin: number, ymax: number) [in Lua 5]
     Draws the imImage into the active cdCanvas.
     The imImage must be a bitmap image, see imImageIsBitmap. 

image:wdPutImageRect(x: number, y: number, w: number, h: number, xmin: number, xmax: number, ymin: number, ymax: number) [in Lua 5]
     Draws the imImage into the active cdCanvas using world coordinates.
     The imImage must be a bitmap image, see imImageIsBitmap. 

image:cdGetImage(x: number, y: number) [in Lua 5]
     Retrieve the imImage data from the active 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.