2020-04-22 13:39:56 +02:00
|
|
|
local bitmap = require'bitmap' --used to read its content
|
|
|
|
|
|
|
|
do --open image
|
2020-04-22 13:41:41 +02:00
|
|
|
local cairo = require'cairo' --used to open the file
|
2020-04-22 13:39:56 +02:00
|
|
|
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)
|