使用 OS X 内置的工具对图像进行注释

发布于 2024-07-29 14:02:20 字数 627 浏览 6 评论 0原文

我想在 OS X 上的图像上覆盖文本,最好不安装额外的软件,这样,作为系统管理员,我可以 一眼就知道机器是最新的,以一种易于编写脚本和易于修改的方式,并且无需 GUI 访问即可运行。 [能够叠加图像或应用变色效果将是一个额外的好处。]

Mac OS X Leopard 附带了大量内置内容:Perl、Python、Ruby、Tcl/Tk、Bash; wxWidgets、一些 Quartz 集成,甚至是 Python 和 Ruby 的 Objective-C 集成。 如果我精通这些系统,一定有几种好方法可以做到这一点。

我继续查看计算机上 /Developer 文件夹中的示例,并且我已经部分了解如何在 Cocoa 中完成此操作并将其转换为 PyObjC。 我决定必须部署 ImageMagick,但在测试中,我遇到了臭名昭著的总线错误,并且如果我可以做我需要的事情,我宁愿不必编译 ImageMagick 或 GraphicsMagick 及其所有依赖项 -盒子。 [也就是说,我会考虑安装额外的组件,但如果能在 OS X 的库存安装上运行一些东西,那将是一个巨大的胜利]。

I want to overlay text on images on OS X, preferably without installing additional software, so that, as a sysadmin, I can know at a glance that machines are up-to-date, in a way that is easily scriptable and easily modifiable, and can run without GUI access. [Being able to overlay images or apply color-changing effects would be a bonus.]

Mac OS X Leopard comes with a ton of stuff built-in: Perl, Python, Ruby, Tcl/Tk, Bash; wxWidgets, some Quartz integration, and even Objective-C integration for Python and Ruby. There must be several good ways to do this, if I were only versed in these systems.

I'm continuing to go through the examples in the /Developer folder on my computer, and I have got a partial idea of how this might be done in Cocoa and converted to PyObjC. I decided I would have to deploy ImageMagick, but in my testing, I am running into an infamous bus error, and would prefer not to have to compile ImageMagick or GraphicsMagick with all its dependancies if I can do what I need to out-of-the-box. [That said, I would consider installing additional components, but it would be a big win to have something that would work on a stock install of OS X].

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

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

发布评论

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

评论(2

月野兔 2024-08-05 14:02:21

CocoaMagic 是一个单文件替代品的大部分RMagick(Ruby 与 ImageMagick 或 GraphicsMagick 集成)。 它本身应该可以用作库,或者通过将内容附加到脚本底部来使用。

CocoaMagic is a single-file replacement for large parts of RMagick (Ruby integration with ImageMagick or GraphicsMagick). It should be useable as a library in its own right, or by appending things to the bottom of the script.

东京女 2024-08-05 14:02:20

使用 Python 和 Python 成像库 似乎相对简单(太尔)。 我不认为 PIL 默认情况下随 OS X 一起安装,但手动安装相对容易,并且没有大量依赖项。 PIL 教程也非常好——编写一个命令行或 GUI 程序来完成您想要的操作应该不会太难。

This seems like it'd be relatively simple to do using Python and the Python Imaging Library (PIL). I don't think PIL is installed with OS X by default, but it's relatively easy to install manually and doesn't have a ton of dependencies. The PIL tutorials are also pretty good -- it shouldn't be too hard to whip up a command-line or GUI program to do what you want.

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