$ luarocks install nano-banana-1 luarocks install nano-banana-1
local banana = require("nano-banana-1")
local image = banana.load_image("path/to/your/image.png")
if image then
local width, height = image:get_dimensions()
print("Image Width:", width)
print("Image Height:", height)
else
print("Failed to load image.")
end
local banana = require("nano-banana-1")
local image = banana.load_image("path/to/your/image.jpg")
if image then
image:to_grayscale()
image:save("path/to/grayscale_image.png") -- Saves as PNG for best grayscale representation
Versions
Dependencies
lua >= 5.1