From 7f7f2c488079f2929f8295eccb491cbe3b40f301 Mon Sep 17 00:00:00 2001 From: scuri Date: Mon, 29 Aug 2011 16:21:30 +0000 Subject: Fixed: im.ProcessUniformErrThreshold, im.ProcessMinMaxThreshold and im.ProcessPercentThreshold return value in Lua. --- html/en/history.html | 6 ++++++ src/lua5/imlua_process.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/html/en/history.html b/html/en/history.html index 4814980..55fe535 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -49,6 +49,12 @@ style="color: #000000"> Fixed: im.ProcessAddMargins in Lua to accept sizes greater or equal than the source size. +
  • + + Fixed: im.ProcessUniformErrThreshold, + im.ProcessMinMaxThreshold and im.ProcessPercentThreshold + return value in Lua.
  • Version diff --git a/src/lua5/imlua_process.c b/src/lua5/imlua_process.c index bb81512..1e31617 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.14 2011/05/02 19:23:57 scuri Exp $ + * $Id: imlua_process.c,v 1.15 2011/08/29 16:21:31 scuri Exp $ */ #include @@ -2766,7 +2766,7 @@ static int imluaProcessUniformErrThreshold (lua_State *L) imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); imlua_matchsize(L, src_image, dst_image); - lua_pushboolean(L, imProcessUniformErrThreshold(src_image, dst_image)); + lua_pushinteger(L, imProcessUniformErrThreshold(src_image, dst_image)); return 1; } @@ -2801,7 +2801,7 @@ static int imluaProcessPercentThreshold (lua_State *L) imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); imlua_matchsize(L, src_image, dst_image); - lua_pushboolean(L, imProcessPercentThreshold(src_image, dst_image, percent)); + lua_pushinteger(L, imProcessPercentThreshold(src_image, dst_image, percent)); return 1; } @@ -2817,7 +2817,7 @@ static int imluaProcessOtsuThreshold (lua_State *L) imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); imlua_matchsize(L, src_image, dst_image); - lua_pushnumber(L, imProcessOtsuThreshold(src_image, dst_image)); + lua_pushinteger(L, imProcessOtsuThreshold(src_image, dst_image)); return 1; } @@ -2834,7 +2834,7 @@ static int imluaProcessMinMaxThreshold (lua_State *L) imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); imlua_matchsize(L, src_image, dst_image); - lua_pushboolean(L, imProcessMinMaxThreshold(src_image, dst_image)); + lua_pushinteger(L, imProcessMinMaxThreshold(src_image, dst_image)); return 1; } -- cgit v1.2.3