leafo / magick

Lua bindings to ImageMagick for LuaJIT using FFI
401 stars 79 forks source link

test2.lua:10: attempt to index local 'img2' (a nil value) #63

Open coliflor opened 3 years ago

coliflor commented 3 years ago

`local magick = require "magick"

local img = magick.load_image("white.ico") local blob = img:get_blob() local img2 = magick.load_image_from_blob(blob) img2:write("test2.ico")`

error:

luajit: test2.lua:6: attempt to index local 'img2' (a nil value) stack traceback: test2.lua:6: in main chunk [C]: at 0x55d98ce58120

Works fine when I try it with a png format. The icon is white and of size 1px and was created using GIMP.