summaryrefslogtreecommitdiff
path: root/src/lua5/im_process.lua
diff options
context:
space:
mode:
authorscuri <scuri>2009-07-03 17:45:12 +0000
committerscuri <scuri>2009-07-03 17:45:12 +0000
commite91dd4dedeef0863cdfbc0be48f6c8a5ecd7c8df (patch)
treeda1f3c1d21871234b7cb34c85d0488516a75394d /src/lua5/im_process.lua
parentd1139487842daba07e165e9c81ba703a87b1e9d4 (diff)
*** empty log message ***
Diffstat (limited to 'src/lua5/im_process.lua')
-rw-r--r--src/lua5/im_process.lua10
1 files changed, 5 insertions, 5 deletions
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)