demo-04-20/demo.lua

11 lines
379 B
Lua
Raw Normal View History

2020-04-22 13:39:56 +02:00
local bitmap = require'bitmap' --used to read its content
do --open image
local cairo = require'cairo' --used to open the file
2020-04-22 17:52:59 +02:00
local image = cairo.load_png(arg[1])
2020-04-22 13:39:56 +02:00
image_infos = {width = image:width(), height = image:height()}
image_bitmap = image:bitmap()
end
local getpixel, setpixel = bitmap.pixel_interface(image_bitmap)
print(image_infos.width, image_infos.height)