From 9b35f72767bd857c8e90f03e6ff804bd0c600bf4 Mon Sep 17 00:00:00 2001 From: scuri Date: Mon, 2 May 2011 19:23:57 +0000 Subject: Fixed: im.ProcessAddMargins in Lua to accept sizes greater or equal than the source size. --- src/lua5/imlua_process.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lua5/imlua_process.c') diff --git a/src/lua5/imlua_process.c b/src/lua5/imlua_process.c index 2e0bb1d..bb81512 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.13 2010/06/10 20:17:40 scuri Exp $ + * $Id: imlua_process.c,v 1.14 2011/05/02 19:23:57 scuri Exp $ */ #include @@ -665,8 +665,8 @@ static int imluaProcessAddMargins (lua_State *L) int ymin = luaL_checkint(L, 4); imlua_matchcolor(L, src_image, dst_image); - luaL_argcheck(L, dst_image->width > (src_image->width + xmin), 2, "destiny image size must be greatter than source image width+xmin, height+ymin"); - luaL_argcheck(L, dst_image->height > (src_image->height + ymin), 2, "destiny image size must be greatter than source image width+xmin, height+ymin"); + luaL_argcheck(L, dst_image->width >= (src_image->width + xmin), 2, "destiny image size must be greatter or equal than source image width+xmin, height+ymin"); + luaL_argcheck(L, dst_image->height >= (src_image->height + ymin), 2, "destiny image size must be greatter or equal than source image width+xmin, height+ymin"); imProcessAddMargins(src_image, dst_image, xmin, ymin); return 0; -- cgit v1.2.3