From 5a422aba704c375a307a902bafe658342e209906 Mon Sep 17 00:00:00 2001 From: scuri Date: Fri, 17 Oct 2008 06:10:15 +0000 Subject: First commit - moving from LuaForge to SourceForge --- test/lua/index.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/lua/index.lua (limited to 'test/lua/index.lua') diff --git a/test/lua/index.lua b/test/lua/index.lua new file mode 100644 index 0000000..1c4c1e4 --- /dev/null +++ b/test/lua/index.lua @@ -0,0 +1,18 @@ +require"imlua" + +local filename = "lena.jpg" +local image = im.FileImageLoad(filename) + +local r = image[0] +local g = image[1] +local b = image[2] + +for row = 0, image:Height() - 1, 10 do + for column = 0, image:Width() - 1, 10 do + r[row][column] = 0 + g[row][column] = 0 + b[row][column] = 0 + end +end + +image:Save("lena_indexing.bmp", "BMP") -- cgit v1.2.3