如何使用自制程序安装 imagemagick 8 位深度

发布于 2024-12-17 04:37:23 字数 231 浏览 5 评论 0原文

我将 Mac Lion 与 RVM、自制程序、捆绑器以及 rmagick gem 一起使用

当我执行以下命令时:

brew install imagemagick

convert --version

安装的 imagemagick 版本是 Q16 (16 位深度),但出于速度原因我更喜欢 8 位深度版本。

实现此目的的正确的brew命令是什么?

I'm using Mac Lion with RVM, homebrew and bundler and the rmagick gem

When I execute the following command:

brew install imagemagick

convert --version

the imagemagick version that is installed is Q16 (16-bit depth) , but I prefer the 8-bit depth version for speed reasons.

what is the correct brew command to achieve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无所谓啦 2024-12-24 04:37:23

我意识到自制公式只是 ruby​​ 脚本,因此搜索了 imagemagick 公式。

locate imagemagick.rb

因此,您可以在 options 方法中看到所有可用选项:

/usr/local/Library/Formula/imagemagick.rb 

所以最后,这只是一个简单的

brew install imagemagick --with-quantum-depth-8

另请参阅 homebrew 安装 imagemagick 8 位版本

brew 2 的更新

Brew 版本 2 不允许额外编译(./configure) 设置不再。您现在必须自己编辑公式并重新编译。

打开并编辑brew公式

brew edit imagemagick

args = %W[ 部分下添加以下行

--with-quantum-depth=8

然后使用 -s 安装并卷曲

brew install imagemagick -s

然后测试您新安装的 ImageMagick

convert --version

您将看到版本号后面第一行的 Q8

聚苯乙烯
如果您使用 rmagick,并且刚刚更改了 ImageMagick,请确保您 gem uninstall rmagick &&捆绑安装

I realised homebrew formula's are just ruby scripts, so searched for the imagemagick formula.

locate imagemagick.rb

So you can see all the available options in the options method in:

/usr/local/Library/Formula/imagemagick.rb 

So in the end, it was just a simple

brew install imagemagick --with-quantum-depth-8

See also homebrew install imagemagick 8 bit version

UPDATE for brew 2

Brew version 2 does not allow additional compile (./configure) settings anymore. You now have to edit the fromula yourself and recompile.

Open and edit the brew formula

brew edit imagemagick

Add the following line under the args = %W[ section

--with-quantum-depth=8

Then install and coile with -s

brew install imagemagick -s

Then test your new installation of ImageMagick with

convert --version

You will see the Q8 on the first line after the version number.

P.S.
if you use rmagick, and just changed your ImageMagick, make sure you gem uninstall rmagick && bundle install

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文