IM: imlua.h Source File

IM - An Imaging Tool

imlua.h

Go to the documentation of this file.
00001 /** \file
00002  * \brief IM Lua 5 Binding
00003  *
00004  * See Copyright Notice in im_lib.h
00005  * $Id: imlua.h,v 1.5 2005/12/12 15:42:29 scuri Exp $
00006  */
00007 
00008 #ifndef __IMLUA_H
00009 #define __IMLUA_H
00010 
00011 #ifdef __cplusplus
00012 extern "C" {
00013 #endif
00014 
00015 /** \defgroup imlua IM Lua 5 Binding
00016  * \par
00017  * Binding for the Lua 5 scripting language. Works with versions 5.0 and 5.1. \n
00018  * Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio                         \n
00019  * Lua 5.1 Copyright (C) 1994-2005 Lua.org, PUC-Rio                           \n
00020  * R. Ierusalimschy, L. H. de Figueiredo & W. Celes                           \n
00021  * http://www.lua.org
00022  * \par
00023  * The name of the functions were changed because of the namespace "im" and because of the object orientation. \n
00024  * As a general rule use:
00025 \verbatim
00026     imXxx  -> im.Xxx
00027     IM_XXX -> im.XXX
00028     imFileXXX(ifile,... -> ifile:XXX(...
00029     imImageXXX(image,... -> image:XXX(...
00030 \endverbatim
00031  * All the objects are garbage collected by the Lua garbage collector.
00032  * \par
00033  * See \ref imlua.h
00034  * \ingroup util */
00035 
00036 #ifdef LUA_NOOBJECT  /* Lua 3 */
00037 void imlua_open(void);
00038 #endif
00039 
00040 #ifdef LUA_TNONE  /* Lua 5 */
00041 
00042 /** Initializes the Lua binding of the main IM library.  \n
00043  * You must link the application with the "imlua5" library.
00044  * \ingroup imlua */
00045 int imlua_open(lua_State *L);
00046 
00047 /** Initializes the Lua binding of the capture library.  \n
00048  * You must link the application with the "imlua_capture5" library.
00049  * \ingroup imlua */
00050 int imlua_open_capture(lua_State *L);
00051 
00052 /** Initializes the Lua binding of the process library.  \n
00053  * You must link the application with the "imlua_process5" library.
00054  * \ingroup imlua */
00055 int imlua_open_process(lua_State *L);
00056 
00057 /** Initializes the Lua binding of the fourier transform library.  \n
00058  * You must link the application with the "imlua_fftw5" library.
00059  * \ingroup imlua */
00060 int imlua_open_fftw(lua_State *L);
00061 
00062 /** Initializes the Lua binding of addicional functions for the CD library.  \n
00063  * CD library is a 2D graphics library. \n
00064  * http://www.tecgraf.puc-rio.br/cd \n
00065  * You must link the application with the "imlua_cd5" library.
00066  *
00067  * The following functions are defined:
00068  * \verbatim bitmap:imImageCreate() -> image: imImage [in Lua 5] 
00069      Creates an imImage from a cdBitmap. \endverbatim
00070  * 
00071  * \verbatim image:cdCreateBitmap() -> bitmap: cdBitmap [in Lua 5]
00072      Creates a cdBitmap from an imImage. 
00073      The imImage must be a bitmap image, see imImageIsBitmap. \endverbatim
00074  * 
00075  * \verbatim image:cdInitBitmap() -> bitmap: cdBitmap [in Lua 5] 
00076      Creates a cdBitmap from an imImage, but reuses image data. 
00077      When the cdBitmap is destroyed the data is preserved. \endverbatim
00078  * 
00079  * \verbatim image:cdPutImageRect(x: number, y: number, w: number, h: number, xmin: number, xmax: number, ymin: number, ymax: number) [in Lua 5]
00080      Draws the imImage into the active cdCanvas.
00081      The imImage must be a bitmap image, see imImageIsBitmap. \endverbatim
00082  * 
00083  * \verbatim image:wdPutImageRect(x: number, y: number, w: number, h: number, xmin: number, xmax: number, ymin: number, ymax: number) [in Lua 5]
00084      Draws the imImage into the active cdCanvas using world coordinates.
00085      The imImage must be a bitmap image, see imImageIsBitmap. \endverbatim
00086  * 
00087  * \verbatim image:cdGetImage(x: number, y: number) [in Lua 5]
00088      Retrieve the imImage data from the active cdCanvas.
00089      The imImage must be a IM_RGB/IM_BYTE image. \endverbatim
00090  * 
00091  * \verbatim image:cdCreateCanvas([res: number]) -> canvas: cdCanvas [in Lua 5]
00092      Creates a cdCanvas using the CD_IMAGERGB driver. Resolution is optional, default is 3.8 pixels per milimiter (96.52 DPI).
00093      The imImage must be a IM_RGB/IM_BYTE image. \endverbatim
00094  * 
00095  * \ingroup imlua */
00096 int imlua_open_cd(lua_State *L);
00097 
00098 
00099 #endif
00100 
00101 #ifdef __cplusplus
00102 }
00103 #endif
00104 
00105 #endif