1

我正在使用 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

有什么建议吗?

4

1 回答 1

2

尝试卸载并重新安装 imagemagick。

brew uninstall imagemagick brew remove imagemagick

然后, brew install imagemagick

于 2013-04-16T01:01:37.280 回答