summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscuri <scuri>2011-05-02 19:23:57 +0000
committerscuri <scuri>2011-05-02 19:23:57 +0000
commit9b35f72767bd857c8e90f03e6ff804bd0c600bf4 (patch)
tree0f198790c74636e4858cb5f54e4501b8425ed31f
parentd6ddc2d4ed649cef0b420ca145e11cc4da2806b1 (diff)
Fixed: im.ProcessAddMargins in Lua to accept sizes greater or equal than the source size.
-rw-r--r--html/en/history.html5
-rw-r--r--src/lua5/imlua_process.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/html/en/history.html b/html/en/history.html
index 5d4ddbf..d8c60a3 100644
--- a/html/en/history.html
+++ b/html/en/history.html
@@ -41,6 +41,11 @@
style="color: #000000">
<span class="hist_fixed">Fixed:</span> </span></span><strong>
imProcessMultipleMean</strong> when source images were data type byte.</li>
+ <li dir="ltr"><span style="color: #008000">
+ <span
+ style="color: #000000">
+ <span class="hist_fixed">Fixed:</span> im.<strong>ProcessAddMargins</strong>
+ in Lua to accept sizes greater or equal than the source size.</span></span></li>
</ul>
<h3 dir="ltr">
<a href="http://sourceforge.net/projects/imtoolkit/files/3.6.3/">Version
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 <memory.h>
@@ -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;