libvips / lua-vips

Lua binding for the libvips image processing library
MIT License
125 stars 10 forks source link

combine.lua example error #41

Closed Rorkh closed 3 years ago

Rorkh commented 3 years ago

Hello.

When I try to run combine.lua example, I got such error

(lua-vips:15837): GLib-GObject-WARNING **: 00:11:40.698: cannot retrieve class for invalid (unclassed) type '<invalid>'
luajit: /usr/local/share/lua/5.1/vips/gvalue.lua:76: no such enum over
lua-vips: no such enum type

stack traceback:
        [C]: in function 'error'
        /usr/local/share/lua/5.1/vips/gvalue.lua:76: in function 'to_enum'
        /usr/local/share/lua/5.1/vips/Image_methods.lua:555: in function 'composite'
        combine.lua:17: in main chunk
        [C]: at 0x559cac02e1d0

What's wrong? Can I fix it myself without editing library itself?

jcupitt commented 3 years ago

Hi @Rorkh, it should work, I see:

john@banana ~/GIT/lua-vips/example (master) $ luajit combine.lua 
writing x.jpg ...

Generating:

x

Though that example pre-dates composite's support for x/y parameters. I should update it.

jcupitt commented 3 years ago

OK, example updated.