clementfarabet / graphicsmagick

A simple Lua wrapper to graphicsmagick.
126 stars 41 forks source link

nil global value 'dok' when gm.convert is called #10

Closed russellfei closed 10 years ago

russellfei commented 10 years ago

called by

gm.convert{ input = imgPath[i], output = imgPath[i], size = tostring( opt.height..'x'..opt.width), verbose = false }

the imgPath is a string list, and opt.height and opt.width are float number.

Error messages:

/usr/local/bin/luajit: /usr/local/share/lua/5.1/graphicsmagick/convert.lua:14: attempt to index global 'dok' (a nil value)
stack traceback:
    /usr/local/share/lua/5.1/graphicsmagick/convert.lua:14: in function 'convert'

Maybe require dok is needed here?

russellfei commented 10 years ago
require 'dok`

is needed at the begining of your code