From e91dd4dedeef0863cdfbc0be48f6c8a5ecd7c8df Mon Sep 17 00:00:00 2001 From: scuri Date: Fri, 3 Jul 2009 17:45:12 +0000 Subject: *** empty log message *** --- src/lua5/im_process.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lua5/im_process.lua') diff --git a/src/lua5/im_process.lua b/src/lua5/im_process.lua index 1d91d5e..fbe9534 100644 --- a/src/lua5/im_process.lua +++ b/src/lua5/im_process.lua @@ -30,7 +30,7 @@ end local function TwoSourcesOneDest (funcname, width, height, color_space, data_type) local func = im[funcname] - + -- see if function is really defined assert(func, string.format("undefined function `%s'", funcname)) @@ -148,12 +148,12 @@ function im.ProcessResizeNew (src_image, width, height) return im.ProcessResize(src_image, dst_image), dst_image end -OneSourceOneDest("ProcessReduceBy4", function (image) return image:Width() / 2 end, +OneSourceOneDest("ProcessReduceBy4", function (image) return image:Width() / 2 end, function (image) return image:Height() / 2 end) function im.ProcessCropNew (src_image, xmin, xmax, ymin, ymax) local width = xmax - xmin + 1 - local height = xmax - ymin + 1 + local height = ymax - ymin + 1 local dst_image = im.ImageCreateBased(src_image, width, height) im.ProcessCrop(src_image, dst_image, xmin, ymin) return dst_image @@ -163,7 +163,7 @@ TwoSourcesOneDest("ProcessInsert") function im.ProcessAddMarginsNew (src_image, xmin, xmax, ymin, ymax) local width = xmax - xmin + 1 - local height = xmax - ymin + 1 + local height = ymax - ymin + 1 local dst_image = im.ImageCreateBased(src_image, width, height) im.ProcessAddMargins(src_image, dst_image, xmin, ymin) return dst_image @@ -217,7 +217,7 @@ function im.ProcessInterlaceSplitNew(src_image) if math.mod(src_image:Height(), 2) then dst_height1 = dst_height1 + 1 end - + local dst_image1 = im.ImageCreateBased(src_image, nil, dst_height1) local dst_image2 = im.ImageCreateBased(src_image, nil, src_image:Height()/2) -- cgit v1.2.3