ImageMagick, invoked from the command line as
magick
, is a
free and open-source
Free and open-source software (FOSS) is software available under a Software license, license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term ...
cross-platform
software suite
A software suite (also known as an application suite) is a collection of computer programs (application software, or programming software) of related functionality, sharing a similar user interface and the ability to easily exchange data with eac ...
for displaying, creating, converting, modifying, and
editing
Editing is the process of selecting and preparing written language, written, Image editing, visual, Audio engineer, audible, or Film editing, cinematic material used by a person or an entity to convey a message or information. The editing p ...
raster image
upright=1, The Smiley, smiley face in the top left corner is a raster image. When enlarged, individual pixels appear as squares. Enlarging further, each pixel can be analyzed, with their colors constructed through combination of the values for ...
s. ImageMagick was created by John Cristy in 1987, and it can read and write over 200
image file formats
An image file format is a file format for a digital image. There are many formats that can be used, such as JPEG, PNG, and GIF. Most formats up until 2022 were for storing 2D images, not 3D ones. The data stored in an image file format may be c ...
. It is widely used in open-source applications.
History
ImageMagick was created in 1987 by John Cristy when working at
DuPont
Dupont, DuPont, Du Pont, duPont, or du Pont may refer to:
People
* Dupont (surname) Dupont, also spelled as DuPont, duPont, Du Pont, or du Pont is a French surname meaning "of the bridge", historically indicating that the holder of the surname re ...
, to convert
24-bit images (16 million colors) to
8-bit images (256 colors), so they could be displayed on most screens at the time. It was freely released in 1990 when DuPont agreed to transfer copyright to ''ImageMagick Studio LLC'', still currently the project maintainer organization.
In May 2016, it was reported that ImageMagick had a vulnerability through which an attacker can
execute arbitrary code on servers that use the application to edit user-uploaded images.
Security researchers at
Cloudflare
Cloudflare, Inc., is an American company that provides content delivery network services, cybersecurity, DDoS mitigation, wide area network services, reverse proxies, Domain Name Service, ICANN-accredited domain registration, and other se ...
observed use of the vulnerability in active hacking attempts.
The security flaw was due to ImageMagick calling backend tools without first properly checking to ensure path and file names are free of improper shell commands.
The vulnerability did not affect ImageMagick distributions that included a properly configured
security policy
Security policy is a definition of what it means to ''be secure'' for a system, organization or other entity. For an organization, it addresses the constraints on behavior of its members as well as constraints imposed on adversaries by mechanisms ...
.
Features and capabilities
The software mainly consists of a number of
command-line interface
A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
utilities for manipulating images. ImageMagick does not have a robust
graphical user interface
A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
to edit images as do
Adobe Photoshop
Adobe Photoshop is a raster graphics editor developed and published by Adobe Inc., Adobe for Microsoft Windows, Windows and macOS. It was created in 1987 by Thomas Knoll, Thomas and John Knoll. It is the most used tool for professional digital ...
and
GIMP
Gimp or GIMP may refer to:
Clothing
* Bondage suit, also called a gimp suit, a type of suit used in BDSM
* Bondage mask, also called a gimp mask, often worn in conjunction with a gimp suit
Embroidery and crafts
* Gimp (thread), an ornamental tr ...
, but does include – for
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
s – a basic native
X Window
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been a ...
GUI (called IMDisplay) for rendering and manipulating images and
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
libraries for many programming languages. The program uses
magic numbers to identify image
file format
A file format is a Computer standard, standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary format, pr ...
s.
A number of programs, such as
Drupal
Drupal () is a free and open-source web content management system (CMS) written in PHP and distributed under the GNU General Public License. Drupal provides an open-source back-end framework for at least 14% of the top 10,000 websites worldwide ...
,
MediaWiki
MediaWiki is free and open-source wiki software originally developed by Magnus Manske for use on Wikipedia on January 25, 2002, and further improved by Lee Daniel Crocker,mailarchive:wikipedia-l/2001-August/000382.html, Magnus Manske's announc ...
,
phpBB
phpBB is an Internet forum package written in the PHP scripting language. The name "phpBB" is an abbreviation of ''PHP Bulletin Board''. Available under the GNU General Public License, phpBB is Free and open-source software, free and open-sourc ...
, and
vBulletin
vBulletin is a proprietary Internet forum software package sold by MH Sub I, LLC doing business as vBulletin (formerly Jelsoft Enterprises and vBulletin Solutions). It is written in PHP and uses a MariaDB or MySQL database server. Similar pro ...
, can use ImageMagick to create image
thumbnail
Thumbnails are reduced-size versions of pictures or videos, used to help in recognizing and organizing them, serving the same role for images as a normal text index does for words. In the age of digital images, visual search engines and image-o ...
s if installed. ImageMagick is also used by other programs, such as
LyX
LyX (styled as LYX; pronounced ) is an open-source software, open source, graphical user interface document processor based on the LaTeX typesetting system. Unlike most word processors, which follow the WYSIWYG ("what you see is what you get") ...
, for converting images.
ImageMagick has a fully integrated
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language".
Perl was developed ...
binding called PerlMagick,
as well as many others: G2F (
Ada), MagickCore (
C), MagickWand (C), ChMagick (Ch), ImageMagickObject (
COM+), Magick++ (
C++), JMagick (
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
), L-Magick (
Lisp
Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation.
Originally specified in the late 1950s, ...
), NMagick (
Neko/
Haxe
Haxe is a high-level cross-platform programming language and compiler that can produce applications and source code for many different computing platforms from one code-base. It is free and open-source software, released under an MIT License. ...
), MagickNet (
.NET
The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
), PascalMagick (
Pascal), MagickWand for PHP (
PHP
PHP is a general-purpose scripting language geared towards web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by the PHP Group. ...
), IMagick (PHP), PythonMagick (
Python), RMagick (
Ruby
Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
), and TclMagick (
Tcl/Tk).
File format conversion
One of the basic and thoroughly-implemented features of ImageMagick is its ability to efficiently and accurately convert images between different file formats (it uses the command
magick
to achieve this).
Color quantization
The number of colors in an image can be reduced to an arbitrary number by weighing the most prominent color values present among the pixels of the image.
A related capability is the
posterization
Posterization or posterisation of an image is the conversion of a continuous gradation of tone to several regions of fewer tones, causing abrupt changes from one tone to another. This was originally done with photographic processes to create ...
artistic effect, which also reduces the number of colors represented in an image. The difference between this and standard color quantization is that while in standard quantization the final palette is selected based upon a weighting of the prominence of existing colors in the image, posterization creates a palette of colors smoothly distributed across the spectrum represented in the image. Whereas with standard color quantization all of the final color values are ones that were in the original image, the color values in a posterized image may not have been present in the original image but are in between the original color values.
Dithering
A fine control is provided for the
dithering that occurs during color and shading alterations, including the ability to generate
halftone
Halftone is the reprographic technique that simulates continuous tone, continuous-tone imagery through the use of dots, varying either in size or in spacing, thus generating a gradient-like effect.Campbell, Alastair. ''The Designer's Lexicon''. ...
dithering.
Liquid rescaling
In 2008, support for
liquid rescaling was added.
This feature allows, for example,
rescaling 4:3 images into 16:9 images without distorting the image.
Artistic effects
ImageMagick includes a variety of filters and features intended to create artistic effects:
* Charcoal sketch transform
*
Posterization
Posterization or posterisation of an image is the conversion of a continuous gradation of tone to several regions of fewer tones, causing abrupt changes from one tone to another. This was originally done with photographic processes to create ...
OpenCL
ImageMagick can use
OpenCL
OpenCL (Open Computing Language) is a software framework, framework for writing programs that execute across heterogeneous computing, heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), di ...
to use an accelerated graphics card (
GPU) for processing.
Deep color
The Q8 version supports up-to 8 bits-per-pixel component (8-bit
grayscale
In digital photography, computer-generated imagery, and colorimetry, a greyscale (more common in Commonwealth English) or grayscale (more common in American English) image is one in which the value of each pixel is a single sample (signal), s ...
, 24- or 32-bit
RGB color). The Q16 version supports up-to 16 bits-per-pixel component (16-bit grayscale, up-to 48- or 64-bit RGB color).
Other
Below are some other features of ImageMagick:
*
Format conversion: convert an image from one format to another (e.g.
PNG to
JPEG
JPEG ( , short for Joint Photographic Experts Group and sometimes retroactively referred to as JPEG 1) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degr ...
).
* Transform: resize, rotate, crop, flip or trim an image. (Applies these without
generation loss
Generation loss is the loss of quality between subsequent copies or transcodes of data. Anything that reduces the quality of the representation when copying, and would cause further reduction in quality on making a copy of the copy, can be con ...
on JPEG files, where possible.)
* Transparency: render portions of an image invisible.
* Draw: add shapes or text to an image.
* Decorate: add a border or frame to an image.
* Special effects: blur, sharpen, threshold, or tint an image.
* Animation: assemble a
GIF
The Graphics Interchange Format (GIF; or , ) is a Raster graphics, bitmap Image file formats, image format that was developed by a team at the online services provider CompuServe led by American computer scientist Steve Wilhite and released ...
animation file from a sequence of images.
* Text and comments: insert descriptive or artistic text in an image.
* Image identification: describe the format and attributes of an image.
* Composite: overlap one image over another.
* Montage: juxtapose image thumbnails on an image canvas.
* Generalized pixel distortion: correct for, or induce image distortions including perspective.
* Morphology of shapes: extract features, describe shapes and recognize patterns in images.
* Motion picture support: read and write the common image formats used in digital film work.
* Image calculator: apply a mathematical expression to an image or image channels.
*
Discrete Fourier transform
In mathematics, the discrete Fourier transform (DFT) converts a finite sequence of equally-spaced Sampling (signal processing), samples of a function (mathematics), function into a same-length sequence of equally-spaced samples of the discre ...
: implements forward and inverse DFT.
* Color management: accurate color management with color profiles or in lieu of – built-in
gamma compression or expansion as demanded by the colorspace.
* High-dynamic-range images: accurately represent the wide range of intensity levels found in real scenes ranging from the brightest direct sunlight to the deepest darkest shadows.
* Encipher or decipher an image: convert ordinary images into unintelligible gibberish and back again.
* Virtual pixel support: convenient access to pixels outside the image region.
* Large image support: read, process, or write mega-, giga-, or tera-pixel image sizes.
* Threads of execution support: ImageMagick is
thread safe
In multi-threaded computer programming, a function is thread-safe when it can be invoked or accessed concurrently by multiple threads without causing unexpected behavior, race conditions, or data corruption. As in the multi-threaded context where ...
and most internal algorithms execute in parallel to take advantage of speed-ups offered by
multi-core processor
A multi-core processor (MCP) is a microprocessor on a single integrated circuit (IC) with two or more separate central processing units (CPUs), called ''cores'' to emphasize their multiplicity (for example, ''dual-core'' or ''quad-core''). Ea ...
chips.
* Heterogeneous distributed processing: certain algorithms are OpenCL-enabled to take advantage of speed-ups offered by executing in concert across heterogeneous platforms consisting of CPUs, GPUs, and other processors.
* Distributed pixel cache: offload intermediate pixel storage to one or more remote servers.
Distribution
ImageMagick is
cross-platform
Within computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several Computing platform, computing platforms. Some ...
, and runs on
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
and
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
systems including
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
,
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
,
iOS
Ios, Io or Nio (, ; ; locally Nios, Νιός) is a Greek island in the Cyclades group in the Aegean Sea. Ios is a hilly island with cliffs down to the sea on most sides. It is situated halfway between Naxos and Santorini. It is about long an ...
,
Android,
Solaris,
Haiku
is a type of short form poetry that originated in Japan. Traditional Japanese haiku consist of three phrases composed of 17 Mora (linguistics), morae (called ''On (Japanese prosody), on'' in Japanese) in a 5, 7, 5 pattern; that include a ''kire ...
and
FreeBSD
FreeBSD is a free-software Unix-like operating system descended from the Berkeley Software Distribution (BSD). The first version was released in 1993 developed from 386BSD, one of the first fully functional and free Unix clones on affordable ...
. The project's
source code
In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.
Since a computer, at base, only ...
can be compiled for other systems, including
AmigaOS 4.0 and
MorphOS
MorphOS is an AmigaOS-like operating system designed for Power and PowerPC based computers. The core, based on the Quark microkernel, is proprietary, although several libraries and other parts are open source, such as the Ambient desktop.
The p ...
. It has been run under
IRIX
IRIX (, ) is a discontinued operating system developed by Silicon Graphics (SGI) to run on the company's proprietary MIPS architecture, MIPS workstations and servers. It is based on UNIX System V with Berkeley Software Distribution, BSD extensio ...
.
Related software
GraphicsMagick is a
fork of ImageMagick 5.5.2 made in 2002, emphasizing the cross-release stability of the programming
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
and command-line options. GraphicsMagick emerged as a result of irreconcilable differences in the developers' group.
See also
*
DevIL
A devil is the mythical personification of evil as it is conceived in various cultures and religious traditions. It is seen as the objectification of a hostile and destructive force. Jeffrey Burton Russell states that the different conce ...
*
GD Graphics Library
*
Netpbm
Netpbm (formerly Pbmplus) is an open-source software, open-source package of graphics programs and a programming library. It is used primarily in Unix, where it is found in all major open-source operating system distributions, but also works on M ...
*
Magick Image File Format
References
Further reading
*
External links
*
ImageMagick Security Policy– ImageMagick Security Policy – best practices strongly encourages you to configure a security policy that suits your local environment
IM Examples– Examples of CLI Usage – provides many small examples demonstrating its vast range of capabilities
Fred's ImageMagick Scripts– provides a plethora of shell scripts using ImageMagick to do more complex tasks
How to automate PDF structural testing using ImageMagick– Demonstrates convert, compare and collate features of ImageMagick.
{{DEFAULTSORT:ImageMagick
1990 software
Command-line software
Free graphics software
Free raster graphics editors
Free software programmed in C
Graphics libraries
Graphics software
IRIX software
Free screenshot software