ImageMagick

ImageMagick®是一个用于创建,编辑,组合或转换位图图像的软件套件。 它可以以各种格式(200多种)读取和写入图像。(ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200).)

Github stars Tracking Chart

ImageMagick

使用 ImageMagick® 创建、编辑、合成或转换位图图像。它可以读取和写入各种格式的图像(超过 200 种),包括PNG、JPEG、GIF、HEIC、TIFF、DPX、EXR、WebP、Postscript、PDF 和 SVG。使用 ImageMagick 可以调整图像的大小,翻转,镜像,旋转,扭曲,剪切和转换图像,调整图像的颜色,应用各种特殊效果,或绘制文本,线条,多边形,椭圆和贝兹尔曲线。

什么是 ImageMagick?

ImageMagick 的功能通常是通过命令行来实现的,您也可以使用您喜欢的编程语言编写的程序来实现这些功能。您可以从这些接口中选择。G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java), L-Magick (Lisp), NMagick (Neko/haXe), MagickNet (.NET), PascalMagick (PascalMagick). NET)、PascalMagick(Pascal)、PerlMagick(Perl)、MagickWand for PHP(PHP)、IMagick(PHP)、PythonMagick(Python)、Magick(R)、RMMagick(Ruby)或TclMagick(Tcl/TK)。通过语言接口,使用 ImageMagick 动态地、自动地修改或创建图像。

ImageMagick 利用多个计算线程来提高性能,可以读取、处理或写入百万像素、千兆像素或太像素大小的图像。

ImageMagick 是一个免费的软件,以二进制版本或源代码的形式提供,你可以在开放和专有的应用程序中使用、复制、修改和发布。它是在 Apache 2.0 许可 下发布的。

ImageMagick 的开发过程保证了 API 和 ABI 的稳定。在每次发布 ImageMagick 之前,我们都会进行全面的安全评估,包括内存错误和线程数据竞赛检测,以防止安全漏洞。

目前发布的是 ImageMagick 7.0.11 系列。它可以运行在 Linux、Windows、Mac Os X、iOS、Android OS 等系统上。

ImageMagick 的权威网站是 https://imagemagick.org。权威的源码库是 https://github.com/ImageMagick/ImageMagick

我们继续维护 ImageMagick 的遗留版本6,网址为 https://legacy.imagemagick.org

特性和能力

以下是 ImageMagick 能做的几个例子:

  • 格式转换:将图像从一种 格式 转换为另一种格式(例如,PNG 到 JPEG)。
  • 变换:调整图像的大小、旋转、偏斜、裁剪、翻转或修剪。
  • 透明度:使图像的一部分不可见。
  • 绘制:向图像添加形状或文字。
  • 装饰:为图像添加边框或框架。
  • 特殊效果:模糊、锐化、阈值或着色图像。
  • 文字和注释:在图像中插入描述性或艺术性文字。
  • 图像渐变:创建一种颜色的渐变混合,其形状为水平、垂直、圆形或椭圆形。
  • 图像识别:描述图像的格式和属性。
  • 合成:将一幅图像重叠在另一幅图像上。
  • 蒙太奇:将图像缩略图并列在图像画布上。
  • 广义像素失真:纠正或诱导图像失真,包括透视。
  • 形状形态:提取图像中的特征、描述形状和识别模式。
  • 划分图像特征:坎尼边缘检测,平均移动,Hough线。
  • 运动图像支持:读写数字电影工作中常用的图像格式。
  • 图像计算器:对图像或图像通道应用数学表达式。
  • 连接分量标注:对图像中的连接区域进行唯一标注。
  • 离散傅立叶变换:实现正向和反向 DFT
  • 感知哈希:将视觉上相同的图像映射到相同或相似的哈希 -- 在图像检索、认证、索引或副本检测以及数字水印中非常有用。
  • 复杂的文本布局:双向文本支持和整形。
  • Color management:accurate color management with color profiles or in lieu of-- built-in gamma compression or expansion as demanded by the colorspace.
  • 双边模糊:非线性、边缘保护和降噪平滑滤波器。
  • 高动态范围图像:准确地表现真实场景中从最亮的阳光直射到最深的阴影的广泛强度水平。
  • 破译或解密图像:将普通图像转换成难以理解的胡言乱语,然后再返回。
  • 虚拟像素支持:方便访问图像区域外的像素。
  • 大图像支持:读取、处理或写入百万像素、千兆像素或太亚像素大小的图像。
  • 支持执行线程:ImageMagick 是线程安全的,大多数内部算法都支持 OpenMP,以利用多核处理器芯片提供的速度提升。
  • 分布式像素缓存:将中间像素存储卸载到一个或多个远程服务器。
  • 异构分布式处理:某些算法支持 OpenCL,以利用由 CPU、GPU 和其他处理器组成的异构平台协同执行所提供的速度提升。
  • iPhone 上的 ImageMagick:在 iPhone 上转换、编辑或合成图像。

ImageMagick 使用实例,展示了如何从命令行使用 ImageMagick 来完成这些任务以及更多。另外,请看 Fred 的 ImageMagick 脚本:大量的命令行脚本,可以进行几何变换、模糊、锐化、边缘处理、去噪和色彩处理。有了 Magick.NET,使用 ImageMagick 无需在服务器或桌面上安装 ImageMagick。

新闻

ImageMagick 最佳实践强烈鼓励您配置适合本地环境的 安全策略

现在 ImageMagick 第 7 版已经发布,我们继续维护 ImageMagick 第 6 版的旧版本,网址是 https://legacy.imagemagick.org。通过我们的 移植指南 了解 ImageMagick 第 7 版与之前的版本有何不同。

想要从 ImageMagick 获得更高的性能?试试这些选项:

  • 为你的系统增加更多的内存,参见像素缓存。
  • 为您的系统添加更多的内核,请参见执行线程支持。
  • 使用 tcmalloc 内存分配库减少锁的争用。
  • 将大型图像推送到固态硬盘上,参见大型图像支持。

如果这些选项令人望而却步,你可以降低图像结果的质量。默认构建是 Q16 HDRI。如果禁用 HDRI,则会使用一半的内存,并使用通常更高效的整数运算,而不是主要的浮点运算。其代价是降低了精度,并且您无法处理超出范围的像素值(如负值)。如果你建立 Q8 非 HDRI 版本的 ImageMagick,你再次减少了一半的内存需求--再次有一个折衷,甚至更少的精度和没有超出范围的像素值。对于 Q8 非 HDRI 版本的 ImageMagick,请使用这些配置脚本选项。--with-quantum-depth=8 --disable-hdri.

(The second edition revised by vz on 2021.03.21)


Overview

Name With OwnerImageMagick/ImageMagick
Primary LanguageC
Program languageShell (Language Count: 14)
PlatformAndroid, iOS, Linux, Mac, Windows
License:Other
Release Count375
Last Release Name7.1.1-32 (Posted on )
First Release Name7.0.1-0 (Posted on )
Created At2015-05-17 20:07:50
Pushed At2024-05-12 17:31:16
Last Commit At
Stargazers Count11.2k
Watchers Count203
Fork Count1.3k
Commits Count22.2k
Has Issues Enabled
Issues Count2956
Issue Open Count90
Pull Requests Count305
Pull Requests Open Count3
Pull Requests Close Count128
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

ImageMagick

Build Status
Fuzzing Status
Donate

ImageMagick® is a free and open-source software suite for displaying, converting, and editing raster image and vector image files. It can read and write over 200 image file formats, and can support a wide range of image manipulation operations, such as resizing, cropping, and color correction.

What is ImageMagick?

ImageMagick is written in C and is available for a wide range of operating systems, including Linux, macOS, and Windows. It can be used as a standalone application, or as a library that can be integrated into other software programs.

The main website for ImageMagick can be found at https://imagemagick.org. The source code for this software can be accessed through the repository located at https://github.com/ImageMagick/ImageMagick. In addition, a legacy version of ImageMagick, version 6, is also still maintained and can be found at https://legacy.imagemagick.org.

Features and Capabilities

One of the key features of ImageMagick is its support for scripting and automation. This allows users to create complex image manipulation pipelines that can be run automatically, without the need for manual intervention. This can be especially useful for tasks that require the processing of large numbers of images, or for tasks that need to be performed on a regular basis.

In addition to its core image manipulation capabilities, ImageMagick also includes a number of other features, such as support for animation, color management, and image rendering. These features make it a versatile tool for a wide range of image-related tasks, including graphic design, scientific visualization, and digital art.

Overall, ImageMagick is a powerful and versatile software suite for displaying, converting, and editing image files. Its support for scripting and automation, along with its other features, make it a valuable tool for a wide range of image-related tasks.

Here are just a few examples of what ImageMagick can do:

Examples of ImageMagick Usage, demonstrates how to use the software from the command line to achieve various effects. There are also several scripts available on the website called Fred's ImageMagick Scripts, which can be used to apply geometric transforms, blur and sharpen images, remove noise, and perform other operations. Additionally, there is a tool called Magick.NET that allows users to access the functionality of ImageMagick without having to install the software on their own systems. Finally, the website also includes a Cookbook with tips and examples for using ImageMagick on Windows systems.

News

ImageMagick best practices strongly encourages you to configure a security policy that suits your local environment.

Now that ImageMagick version 7 is released, we continue to maintain the legacy release of ImageMagick, version 6, at https://legacy.imagemagick.org. Learn how ImageMagick version 7 differs from previous versions with our porting guide.

Want more performance from ImageMagick? Try these options:

If these options are prohibitive, you can reduce the quality of the image results. The default build is Q16 HDRI. If you disable HDRI, you use half the memory and instead of predominantly floating point operations, you use the typically more efficient integer operations. The tradeoff is reduced precision and you cannot process out of range pixel values (e.g. negative). If you build the Q8 non-HDRI version of ImageMagick, you again reduce the memory requirements in half-- and once again there is a tradeoff, even less precision and no out of range pixel values. For a Q8 non-HDRI build of ImageMagick, use these configure script options: --with-quantum-depth=8 --disable-hdri.

To the top