我正在使用 rails + jquerymobile + 签名板(http://thomasjbradley.ca/lab/signature-pad/)
我的问题是转换为图像(http://thomasjbradley.ca/lab/signature-pad/#images)
当我绘制签名并提交表单时,我得到了一些奇怪的错误:
convert.exe: Non-conforming drawing primitive definition `line' @ error/draw.c/DrawImage/3154.
convert.exe: unable to open image `111,9': No such file or directory @ error/blob.c/OpenBlob/2641.
convert.exe: no decode delegate for this image format `111,9' @ error/constitute.c/ReadImage/550.
我的controller.rb中的代码:
instructions = JSON.load(params[:output]).map { |h| "line #{h['mx']},#{h['my']} #{h['lx']},#{h['ly']}" } * ' '
system "convert -size 198x55 xc:transparent -stroke blue -draw '#{instructions}' signature.png"
https://gist.github.com/branch14/4258871
有什么建议吗?