summaryrefslogtreecommitdiff
path: root/html/examples/index.lua
blob: 1c4c1e488bf9d81623b96b5390b68e3c9606f96c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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")