diff options
author | scuri <scuri> | 2009-06-24 20:42:03 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-06-24 20:42:03 +0000 |
commit | 9af5da11f9475fa6d82ae97ec45037136d4f62f9 (patch) | |
tree | fd20aecbe316fda319dff12efe56796269be2f9f /src/lua5 | |
parent | b8e86ddb931e36db0e66d759dbbde198eaa210f6 (diff) |
*** empty log message ***
Diffstat (limited to 'src/lua5')
-rw-r--r-- | src/lua5/imlua_process.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lua5/imlua_process.c b/src/lua5/imlua_process.c index f4a5ce7..1c77dac 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.2 2008/11/26 17:25:51 scuri Exp $ + * $Id: imlua_process.c,v 1.3 2009/06/24 20:42:29 scuri Exp $ */ #include <memory.h> @@ -625,10 +625,10 @@ static int imluaProcessCrop (lua_State *L) int ymin = luaL_checkint(L, 4); imlua_matchcolor(L, src_image, dst_image); - luaL_argcheck(L, xmin > 0 && xmin < src_image->width, 3, "xmin must be > 0 and < width"); - luaL_argcheck(L, ymin > 0 && ymin < src_image->height, 3, "ymin must be > 0 and < height"); - luaL_argcheck(L, dst_image->width < (src_image->width - xmin), 2, "destiny image size must be smaller than source image width-xmin, height-ymin"); - luaL_argcheck(L, dst_image->height < (src_image->height - ymin), 2, "destiny image size must be smaller than source image width-xmin, height-ymin"); + luaL_argcheck(L, xmin >= 0 && xmin < src_image->width, 3, "xmin must be >= 0 and < width"); + luaL_argcheck(L, ymin >= 0 && ymin < src_image->height, 3, "ymin must be >= 0 and < height"); + luaL_argcheck(L, dst_image->width <= (src_image->width - xmin), 2, "destiny image size must be smaller than source image width-xmin, height-ymin"); + luaL_argcheck(L, dst_image->height <= (src_image->height - ymin), 2, "destiny image size must be smaller than source image width-xmin, height-ymin"); imProcessCrop(src_image, dst_image, xmin, ymin); return 0; @@ -646,8 +646,8 @@ static int imluaProcessInsert (lua_State *L) int ymin = luaL_checkint(L, 5); imlua_matchcolor(L, src_image, dst_image); - luaL_argcheck(L, xmin > 0 && xmin < src_image->width, 3, "xmin must be > 0 and < width"); - luaL_argcheck(L, ymin > 0 && ymin < src_image->height, 3, "ymin must be > 0 and < height"); + luaL_argcheck(L, xmin >= 0 && xmin < src_image->width, 3, "xmin must be >= 0 and < width"); + luaL_argcheck(L, ymin >= 0 && ymin < src_image->height, 3, "ymin must be >= 0 and < height"); imProcessInsert(src_image, region_image, dst_image, xmin, ymin); return 0; |