【问题标题】:Rails and signature pad from Thomas J BradleyThomas J Bradley 的导轨和签名板
【发布时间】:2013-04-16 09:01:37
【问题描述】:

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

有什么建议吗?

【问题讨论】:

    标签: jquery ruby-on-rails ruby ruby-on-rails-3 signature


    【解决方案1】:

    尝试卸载并重新安装 imagemagick。

    brew uninstall imagemagick 或者 brew remove imagemagick .

    那么, brew install imagemagick

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-03-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-28
      相关资源
      最近更新 更多