diff options
author | scuri <scuri> | 2009-06-26 17:14:56 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-06-26 17:14:56 +0000 |
commit | 193cd3427108bd127e09f391f7fe51f6b62590e9 (patch) | |
tree | 7dfd83dec634c15f87f578266f6fdb0df046613a /html/examples/index.lua | |
parent | 734afa90c3dda1232e9490d08346be4f2ffefec1 (diff) |
*** empty log message ***
Diffstat (limited to 'html/examples/index.lua')
-rw-r--r-- | html/examples/index.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/html/examples/index.lua b/html/examples/index.lua new file mode 100644 index 0000000..1c4c1e4 --- /dev/null +++ b/html/examples/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") |