- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
当我尝试通过 Homebrew 安装 ImageMagick 时,我得到了一个非常奇怪的答案。
它给了我这个:
Holger-Sindbaeks-MacBook-Air:showwwdown_0.3 holgersindbaek$ brew install imagemagick
Error: undefined method `=~' for #<Pathname:/usr/local/Library/Formula/jpeg.rb>
Please report this bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
/usr/local/Library/Homebrew/formula.rb:426:in `factory'
/usr/local/Library/Homebrew/formula_installer.rb:38:in `block (2 levels) in install'
/usr/local/Library/Homebrew/extend/ARGV.rb:121:in `filter_for_dependencies'
/usr/local/Library/Homebrew/formula_installer.rb:34:in `block in install'
/usr/local/Library/Homebrew/formula_installer.rb:30:in `each'
/usr/local/Library/Homebrew/formula_installer.rb:30:in `install'
/usr/local/Library/Homebrew/cmd/install.rb:103:in `block in install_formulae'
/usr/local/Library/Homebrew/cmd/install.rb:86:in `each'
/usr/local/Library/Homebrew/cmd/install.rb:86:in `install_formulae'
/usr/local/Library/Homebrew/cmd/install.rb:24:in `install'
/usr/local/bin/brew:83:in `<main>'
它绝对没有告诉我任何信息,我也不知道下一步会是什么。你有什么想法吗?
我在 Mac OSX 10.6 和 Ruby 1.9.2 上运行
最佳答案
此时(2012 年 1 月)我很好奇似乎不适用于 1.9.2 的主要 gem
对于 imagemagick,我在以下位置找到了一个有效的 1.9.2 版本:
http://yakobubaidullah.blogspot.com/2011/01/installing-papperclip-rmagick2.html
注[1]:从这样的经历中,我学会了仔细挑选我的 gem,对 gem 的“受欢迎程度”进行评级,这是一个很好的想法,可以很好地了解主流的程度(以及因此升级到 ruby 和 rails 的可能性有多大)版本)。
对于 github gems,我查看:最近更新的时间(例如 github 主页)。有多少个 fork ?有多少下载量?
对于 rubygems,我查看下载次数和随时间变化的统计数据图表
注[2]:github 是 gems 的旧源{并且仍然是旧 gems 的源},rubygems 是"new"的地方——但这也意味着(相对)新的 gems。我相信这发生在 2010/2011 年的某个时候。
来自网站 rubygems.org:“该项目于 2009 年 4 月由 Nick Quaranto 启动,此后发展到包括超过 55 名 Ruby 爱好者的贡献和数百万的 gem 下载。截至 RubyGems 1.3.6发布后,该站点已从 Gemcutter 重命名为 RubyGems.org,以巩固该站点在 Ruby 社区中的中心地位。
对该站点技术方面的一些见解:它是 100% Ruby。主站点是一个 Rails 应用程序,RubyGem 服务是通过 Sinatra 完成的。 Gem 托管在 Amazon S3 上,发布新 Gem 和准备好安装之间的时间很短。有关详细信息,请查看 GitHub 上获得 MIT 许可的代码。”
这些链接也可能有帮助:
Can't install Imagemagick on Mac with Brew
Cannot install older version of ImageMagick via Homebrew
Installation of imagemagick with BREW
注[3]:最后,正如我在上面评论的那样,在 ruby 1.9 中 =~ 是可重新定义的,而在 1.8 中则不是。
关于ruby-on-rails - 错误 : undefined method `=~' when installing ImageMagick through Homebrew,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8872447/
使用 ImageMagick 我想绘制一个相对于图像宽度的图元 这对我不起作用 mogrify -stroke white -fill white -draw "rectangle 100,100 %
对于一个项目,我试图创建图像的透视失真以匹配 DVD 盒正面模板。所以我想使用 ImageMagick (CLI) 自动执行此操作,但我很难理解此转换的数学方面。 convert \ -verbo
我遵循的是这个示例http://cubiq.org/create-fixed-size-thumbnails-with-imagemagick,这正是我要对图像执行的操作,除了背景残留物(即白色边框)
我将.psd转换为一个文件夹内的.png文件。如何在具有不同扩展名的文件夹中保持每个文件的名称相同? 例如,我输入文件夹图像,然后从终端执行 $ convert *.psd *.png 但是它给.pn
我正在使用以下 ImageMagick 脚本(带有用于 PHP 的 Imagick)来生成字体图像。这个脚本用大约 0.1 秒来生成一个大约 30 个字符的 48 大小的图像。目标速度大约是 0.01
我正在使用以下 ImageMagick 脚本(带有用于 PHP 的 Imagick)来生成字体图像。这个脚本用大约 0.1 秒来生成一个大约 30 个字符的 48 大小的图像。目标速度大约是 0.01
我遇到了一个 paper它使用由 ImageMagick convert 命令生成的合成手写数据,使用许多不同的手写字体 ( Example images from paper )。 他们已经用他们的
我有一张图片。我需要从图像中裁剪矩形区域。该矩形区域由黑色边框标识。矩形里面是我需要的。是否可以在 imagemagick 中裁剪黑色边框矩形区域?我知道可以通过提供矩形区域的偏移量(-crop Wx
我有一堆图片是桌面墙纸,但尺寸不同。对于我的示例,我将使用分辨率 1920x1080。如何缩放图像以便: 对于宽度和高度小于我的屏幕的图像,图像居中然后按比例放大,直到两者中较小的达到 1920 或
我必须处理大量图像,并且正在寻找检测边框颜色的方法。例如,拍摄这张图片: 是否可以通过某种方式确定图像具有白色背景?解决方法是提取 1px 的边框并检查提取的边框的颜色是否同样为白色。但我认为 Ima
我正在使用 PowerShell 脚本将 Unicode 字符批量转换为 PNG 文件。参见 http://pastebin.com/aGJzk4Hh . 我发现要转换 " 字符,必须使用指定标签:\
目前我正在尝试转换为 HEIF,但唯一与 HEIF 相关的选项是 heic:preserve-orientation(在 CLI 选项 define 中)。我如何为 HEIF 和其他格式使用其他特定于
正如您在答案 “Diff” an image using ImageMagick 中看到的那样,“delta”图像以某种方式变亮了: 如何使用 ImageMagick 使图像变亮? 最佳答案 我假设您
我正在使用 ImageMagick 的 convert 来调整一些 .png 文件的大小,问题是 convert 似乎正在向 .png 写入一些额外的信息: EXtdate:create 2012-1
此 blog post 图像中使用的边框阴影效果似乎嵌入在图像本身(不是 css3)中。如何在 imagemagick 中创建它? 编辑 1: 我偶然发现的解决方案作为答案发布在下面。 最佳答案 有一
我有大约 200 张扫描照片,我想从中裁剪掉空白区域。参见示例: 有人可以为我提供适当的命令行代码来执行此操作吗?...我一直在尝试整理 -trim 和 -fuzz 选项,但没有成功。并非所有图像的大
我正在创建一个重命名照片的 bash 脚本,以便它们在文件名中包含日期和时间。我想用 ImageMagick 的 identify 实用程序建立一个文件名。 identify -format "IMG
我有一张长图source pic我想为每个子图像添加文本,但是当向书中添加文本时,我失败了,最终图像和代码: convert src.jpg -gravity north -pointsize 53
我想使用 CLI 向图像添加一个黑色矩形,该图像 1) 居中并且 2) 从每个边缘开始 X 像素。 基本上,我几乎想要 -border 的对立面(而不是添加某种颜色的边框,我想保留图像的 X 像素作为
所以我想创建一张由三张小图片组成的 3600x2280 大图片。第一个应调整为 1680x1050 并放置在左上角。第二个需要调整为 1920x1200 并立即放置在它的右侧(+1680 以上)。第三
我是一名优秀的程序员,十分优秀!