diff options
author | scuri <scuri> | 2009-08-04 21:35:15 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-08-04 21:35:15 +0000 |
commit | 08e5c41d42be826c18480b277f644a864f237b9b (patch) | |
tree | cf666b0bb0f2d38b2f650751adb081b6f2d60af3 | |
parent | 26990cb2d1f55272c6f1d09dcc0f3062dc1e6cf8 (diff) |
*** empty log message ***
-rw-r--r-- | html/en/history.html | 9 | ||||
-rw-r--r-- | include/im.h | 2 | ||||
-rw-r--r-- | include/im_convert.h | 4 | ||||
-rw-r--r-- | src/lua5/imlua_aux.c | 3 | ||||
-rw-r--r-- | src/lua5/imlua_convert.c | 6 | ||||
-rw-r--r-- | src/lua5/imlua_file.c | 8 | ||||
-rw-r--r-- | src/lua5/imlua_process.c | 19 |
7 files changed, 28 insertions, 23 deletions
diff --git a/html/en/history.html b/html/en/history.html index 23fa053..108841b 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -12,7 +12,7 @@ <h1>History of Changes</h1> <h3 dir="ltr"> - CVS (11/Jul/2009)</h3> + CVS (04/Aug/2009)</h3> <ul> <li><span style="color: #008000">Changed:</span> libPNG updated to version 1.2.37. Removed changes to the library that made it incompatible with other @@ -22,7 +22,12 @@ in Lua.</span></span> </li> <li><span style="color: #008000"><span style="color: #ff0000">Fixed:</span><span style="color: #000000"> loading of RAW data.</span></span></li> - <li></li> + <li><span style="color: #008000"><span style="color: #ff0000">Fixed:</span><span + style="color: #000000"> boolean parameters in <strong> + file:ReadImageData, im.ProcessSplitComplex, + im.ProcessQuantizeRGBUniform, im.ProcessBitPlane, im.ProcessRotateRef, + im.ProcessRotate90, im.ProcessBinMorphConvolve, im.ConvertDataType</strong> + and <strong>im.ConvertToBitmap</strong> in Lua.</span></span></li> </ul> <h3 dir="ltr"> Version 3.4.2 (26/Jun/2009)</h3> diff --git a/include/im.h b/include/im.h index 8091e77..a6673cb 100644 --- a/include/im.h +++ b/include/im.h @@ -206,7 +206,7 @@ int imFileWriteImageInfo(imFile* ifile, int width, int height, int user_color_mo * Returns an error code. * See also \ref imErrorCodes, \ref imDataType, \ref imColorSpace and \ref imColorModeConfig. * - * \verbatim ifile:ReadImageData(data: userdata, convert2bitmap: bool, color_mode_flags: number) -> error: number [in Lua 5] \endverbatim + * \verbatim ifile:ReadImageData(data: userdata, convert2bitmap: boolean, color_mode_flags: number) -> error: number [in Lua 5] \endverbatim * \ingroup file */ int imFileReadImageData(imFile* ifile, void* data, int convert2bitmap, int color_mode_flags); diff --git a/include/im_convert.h b/include/im_convert.h index 47950ea..4ec7f0a 100644 --- a/include/im_convert.h +++ b/include/im_convert.h @@ -65,7 +65,7 @@ enum imCastMode * Returns IM_ERR_NONE, IM_ERR_DATA or IM_ERR_COUNTER, see also \ref imErrorCodes. * See also \ref imComplex2Real, \ref imGammaFactor and \ref imCastMode. * - * \verbatim im.ConvertDataType(src_image: imImage, dst_image: imImage, cpx2real: number, gamma: number, abssolute: bool, cast_mode: number) -> error: number [in Lua 5] \endverbatim + * \verbatim im.ConvertDataType(src_image: imImage, dst_image: imImage, cpx2real: number, gamma: number, abssolute: boolean, cast_mode: number) -> error: number [in Lua 5] \endverbatim * \ingroup convert */ int imConvertDataType(const imImage* src_image, imImage* dst_image, int cpx2real, float gamma, int abssolute, int cast_mode); @@ -85,7 +85,7 @@ int imConvertColorSpace(const imImage* src_image, imImage* dst_image); * Returns IM_ERR_NONE, IM_ERR_DATA or IM_ERR_COUNTER, see also \ref imErrorCodes. * See also \ref imComplex2Real, \ref imGammaFactor and \ref imCastMode. * - * \verbatim im.ConvertToBitmap(src_image: imImage, dst_image: imImage, cpx2real: number, gamma: number, abssolute: bool, cast_mode: number) -> error: number [in Lua 5] \endverbatim + * \verbatim im.ConvertToBitmap(src_image: imImage, dst_image: imImage, cpx2real: number, gamma: number, abssolute: boolean, cast_mode: number) -> error: number [in Lua 5] \endverbatim * \ingroup convert */ int imConvertToBitmap(const imImage* src_image, imImage* dst_image, int cpx2real, float gamma, int abssolute, int cast_mode); diff --git a/src/lua5/imlua_aux.c b/src/lua5/imlua_aux.c index d5df8ac..e472dca 100644 --- a/src/lua5/imlua_aux.c +++ b/src/lua5/imlua_aux.c @@ -2,7 +2,7 @@ * \brief IM Lua 5 Binding * * See Copyright Notice in im_lib.h - * $Id: imlua_aux.c,v 1.1 2008/10/17 06:16:32 scuri Exp $ + * $Id: imlua_aux.c,v 1.2 2009/08/04 21:35:26 scuri Exp $ */ #include <memory.h> @@ -20,6 +20,7 @@ #include "imlua_aux.h" #include "imlua_image.h" + /*****************************************************************************\ \*****************************************************************************/ int imlua_getn (lua_State *L, int index) diff --git a/src/lua5/imlua_convert.c b/src/lua5/imlua_convert.c index 5ec73c9..96b8429 100644 --- a/src/lua5/imlua_convert.c +++ b/src/lua5/imlua_convert.c @@ -2,7 +2,7 @@ * \brief IM Lua 5 Binding * * See Copyright Notice in im_lib.h - * $Id: imlua_convert.c,v 1.1 2008/10/17 06:16:32 scuri Exp $ + * $Id: imlua_convert.c,v 1.2 2009/08/04 21:35:26 scuri Exp $ */ #include "im.h" @@ -25,7 +25,7 @@ static int imluaConvertDataType (lua_State *L) imImage* dst_image = imlua_checkimage(L, 2); int cpx2real = luaL_checkint(L, 3); float gamma = (float) luaL_checknumber(L, 4); - int abssolute = luaL_checkint(L, 5); + int abssolute = lua_toboolean(L, 5); int cast_mode = luaL_checkint(L, 6); imlua_matchcolorspace(L, src_image, dst_image); @@ -55,7 +55,7 @@ static int imluaConvertToBitmap (lua_State *L) imImage* dst_image = imlua_checkimage(L, 2); int cpx2real = luaL_checkint(L, 3); float gamma = (float) luaL_checknumber(L, 4); - int abssolute = luaL_checkint(L, 5); + int abssolute = lua_toboolean(L, 5); int cast_mode = luaL_checkint(L, 6); imlua_matchsize(L, src_image, dst_image); diff --git a/src/lua5/imlua_file.c b/src/lua5/imlua_file.c index fd20c36..066dd76 100644 --- a/src/lua5/imlua_file.c +++ b/src/lua5/imlua_file.c @@ -2,7 +2,7 @@ * \brief IM Lua 5 Binding * * See Copyright Notice in im_lib.h - * $Id: imlua_file.c,v 1.1 2008/10/17 06:16:32 scuri Exp $ + * $Id: imlua_file.c,v 1.2 2009/08/04 21:35:26 scuri Exp $ */ #include <string.h> @@ -542,20 +542,20 @@ static int imluaFileWriteImageInfo (lua_State *L) } /*****************************************************************************\ - file:imFileReadImageData(data) + file:ReadImageData(data) \*****************************************************************************/ static int imluaFileReadImageData (lua_State *L) { imFile *ifile = imlua_checkfile(L, 1); void* data = lua_touserdata(L, 2); - int convert2bitmap = luaL_checkint(L, 3); + int convert2bitmap = lua_toboolean(L, 3); int color_mode_flags = luaL_checkint(L, 4); imlua_pusherror(L, imFileReadImageData(ifile, data, convert2bitmap, color_mode_flags)); return 1; } /*****************************************************************************\ - file:imFileWriteImageData(data) + file:WriteImageData(data) \*****************************************************************************/ static int imluaFileWriteImageData (lua_State *L) { diff --git a/src/lua5/imlua_process.c b/src/lua5/imlua_process.c index 6f08588..492a1ba 100644 --- a/src/lua5/imlua_process.c +++ b/src/lua5/imlua_process.c @@ -2,7 +2,7 @@ * \brief IM Lua 5 Binding * * See Copyright Notice in im_lib.h - * $Id: imlua_process.c,v 1.4 2009/07/03 17:45:13 scuri Exp $ + * $Id: imlua_process.c,v 1.5 2009/08/04 21:35:26 scuri Exp $ */ #include <memory.h> @@ -724,7 +724,7 @@ static int imluaProcessRotateRef (lua_State *L) double sin0 = (double) luaL_checknumber(L, 4); int x = luaL_checkint(L, 5); int y = luaL_checkint(L, 6); - int to_origin = luaL_checkint(L, 7); + int to_origin = lua_toboolean(L, 7); int order = luaL_checkint(L, 8); imlua_matchcolor(L, src_image, dst_image); @@ -741,7 +741,7 @@ static int imluaProcessRotate90 (lua_State *L) { imImage *src_image = imlua_checkimage(L, 1); imImage *dst_image = imlua_checkimage(L, 2); - int dir = luaL_checkint(L, 3); + int dir = lua_toboolean(L, 3); imlua_matchcolor(L, src_image, dst_image); luaL_argcheck(L, dst_image->width == src_image->height && dst_image->height == src_image->width, 2, "destiny width and height must have the source height and width"); @@ -1010,7 +1010,7 @@ static int imluaProcessBinMorphConvolve (lua_State *L) imImage *src_image = imlua_checkimage(L, 1); imImage *dst_image = imlua_checkimage(L, 2); imImage *kernel = imlua_checkimage(L, 3); - int hit_white = luaL_checkint(L, 4); + int hit_white = lua_toboolean(L, 4); int iter = luaL_checkint(L, 5); imlua_checkcolorspace(L, 1, src_image, IM_BINARY); @@ -1659,7 +1659,7 @@ static int imluaProcessSplitComplex (lua_State *L) imImage *src_image = imlua_checkimage(L, 1); imImage *dst_image1 = imlua_checkimage(L, 2); imImage *dst_image2 = imlua_checkimage(L, 3); - int polar = luaL_checkint(L, 4); + int polar = lua_toboolean(L, 4); imlua_checkdatatype(L, 1, src_image, IM_CFLOAT); imlua_checkdatatype(L, 2, dst_image1, IM_FLOAT); @@ -1783,7 +1783,7 @@ static int imluaProcessAutoCovariance (lua_State *L) imlua_matchcolorspace(L, src_image, dst_image); imlua_checkdatatype(L, 3, dst_image, IM_FLOAT); - lua_pushnumber(L, imProcessAutoCovariance(src_image, mean_image, dst_image)); + lua_pushboolean(L, imProcessAutoCovariance(src_image, mean_image, dst_image)); return 1; } @@ -1815,7 +1815,7 @@ static int imluaProcessQuantizeRGBUniform (lua_State *L) { imImage *src_image = imlua_checkimage(L, 1); imImage *dst_image = imlua_checkimage(L, 2); - int dither = luaL_checkint(L, 3); + int dither = lua_toboolean(L, 3); imlua_checktype(L, 1, src_image, IM_RGB, IM_BYTE); imlua_checkcolorspace(L, 2, dst_image, IM_MAP); @@ -2131,7 +2131,7 @@ static int imluaProcessBitPlane (lua_State *L) imImage *src_image = imlua_checkimage(L, 1); imImage *dst_image = imlua_checkimage(L, 2); int plane = luaL_checkint(L, 3); - int reset = luaL_checkint(L, 4); + int reset = lua_toboolean(L, 4); imlua_checkdatatype(L, 1, src_image, IM_BYTE); imlua_match(L, src_image, dst_image); @@ -2201,7 +2201,7 @@ static float imluaRenderCondFunc (int x, int y, int d, int *cond, float *param) lua_call(L, 4, 2); - *cond = luaL_checkint(L, -1); + *cond = lua_toboolean(L, -1); return (float) luaL_checknumber(L, -2); } @@ -3088,4 +3088,3 @@ int luaopen_imlua_process51(lua_State *L) { return imlua_open_process(L); } - |