diff --git a/demo.lua b/demo.lua new file mode 100644 index 0000000..99f0092 --- /dev/null +++ b/demo.lua @@ -0,0 +1,10 @@ +local cairo = require'cairo' --used to open the file +local bitmap = require'bitmap' --used to read its content + +do --open image + local image = cairo.load_png("/home/user/cle-usb-emulateurs.png") + 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)