diff --git a/index.html b/index.html index 6e937be..5427502 100644 --- a/index.html +++ b/index.html @@ -2831,6 +2831,29 @@
About ImageMagick
+ + + +
+
Differences Between ImageMagick Version 6 and Version 7
+

ImageMagick currently maintains two versions of its software: version 6 and version 7. ImageMagick released version 7 in 2016, and the platform encourages its user base to upgrade to the latest version. However, version 6, sometimes referred to as Legacy ImageMagick, is still maintained. A patch for Legacy ImageMagick version 6 was released as recently as October 2025. A link to Legacy ImageMagick’s repository can be found here.

The structure of ImageMagick commands in the examples on ffmprovisr have primarily been formatted for compatibility with Legacy ImageMagick. While many commands that use convert and mogrify can still be executed in version 7, not all are guaranteed to work. Many version 7 commands follow a similar structure to those of version 6, but with magick being used to start commands rather than convert and mogrify in most cases. Version 7 commands can be found at the bottom of each ImageMagick example on ffmprovisr.

+

New ImageMagick users and current Legacy users considering upgrading should assess the differences between each version before choosing which one to install. Below are just a few of the differences users should be aware of.

+

Unlike Legacy ImageMagick, as a default, version 7 stores image pixels with High Dynamic Range Imaging (HDRI). This is typically with a bit depth up to Q16. To disable HDRI, the following command should be executed:

+

./configure --disable-hdri

+

Some Legacy ImageMagick command options are no longer supported by version 7, including but not limited to: +

-maximum + -median + -minimum + -origin + -passphrase
+

Lastly, those operating Legacy commands on older hardware should take steps to ensure version 7's compatibility with their current system. Saved scripts that leverage Legacy command structures may need to be individually updated.

+

For further reading on differences between ImageMagick versions, including a full list of deprecated Legacy command options, users can refer to the Porting Guide on ImageMagick’s website.

+ +
+ + + + @@ -2844,6 +2867,7 @@
Compare two images
image1.ext image2.ext
takes two images as input
null:
throws away the comparison image that would be generated
+

★ImageMagick V7 command:magick compare -metric ae image1.ext image2.ext null:

@@ -2853,8 +2877,8 @@
Compare two images
Create thumbnails
-

Creates thumbnails for all files in a folder and saves them in that folder.

mogrify -resize 80x80 -format jpg -quality 75 -path thumbs *.jpg

+

Creates thumbnails for all files in a folder and saves them in that folder.

mogrify
starts the command
-resize 80x80
resizes copies of original images to 80x80 pixels
@@ -2864,6 +2888,7 @@
Create thumbnails
Note: You will have to make this folder if it doesn't already exist.
*.jpg
The asterisk acts as a "wildcard" to be applied to every file in the directory.
+

★ImageMagick V7 command:magick mogrify -resize 80x80 -format jpg -quality 75 -path thumbs *.jpg

@@ -2881,6 +2906,7 @@

Create grid of images

-geometry +0+0
specifies to include no spacing around any of the tiles; they will be flush against each other
output_grid.jpg
path and name of the output file
+

★ImageMagick V7 command:magick montage @list.txt -tile 6x12 -geometry +0+0 output_grid.jpg

@@ -2890,16 +2916,17 @@

Create grid of images

Get file signature data
-

convert -verbose input_file.ext | grep -i signature

+

identify -verbose input_file.ext | grep -i signature

Gets signature data from an image file, which is a hash that can be used to uniquely identify the image.

-
convert
starts the command
+
identify
starts the command
-verbose
sets verbose flag for collecting the most data
input_file.ext
path and name of image file
|
pipe the data into something else
grep
starts the grep command
-i signature
ignore case and search for the phrase "signature"
+

★ImageMagick V7 command:magick identify -verbose input_file.ext | grep -i signature

@@ -2917,6 +2944,7 @@
Remove exif data
-strip
removes exif metadata
*.jpg
applies command to all .jpgs in current folder
+

★ImageMagick V7 command:magick mogrify -path ./stripped/ -strip *.jpg

@@ -2934,9 +2962,205 @@
Resize to width
-resize 750
resizes the image to 750 pixels wide, retaining aspect ratio
output_file.ext
path and name of the output file
+

★ImageMagick V7 command:magick input_file.ext -resize 750 output_file.ext

+ + + + +
+
Format conversion
+

convert input_file.png output_file.jpg

+

Converts a file from one format to another.

+
+
convert
starts the command
+
input_file.ext output_file.ext
takes the input file format and converts it to the output file format. Although this example uses .png to .jpg any format conversion combination can be used so long as the formats are supported by Image Magick.
+
+

★ImageMagick V7 command: magick input_file.png output_file.jpg

+ +
+ + + +
+
Supported format list
+

identify -list format

+

Displays a list of the formats supported by Image Magick.

+
+
identify
starts the command
+
-list format
displays a list of the formats supported by Image Magick.
+
+

★ImageMagick V7 command: magick identify -list format

+ +
+ + + + + +
+
Print detailed image information
+

identify -verbose input_image

+

Prints detailed information about the properties of a given image.

+
+
identify
starts the command
+
-verbose input_image
prints out detailed information of the given image file.
+
+

★ImageMagick V7 command: magick identify -verbose input_image

+ +
+ + + + +
+
Duplicate an image
+

convert input_image -duplicate count output_image

+

Duplicate an image one or more times.

+
+
convert
starts the command
+
input_image
the image file that is going to be duplicated.
+
-duplicate count input_image
duplicates the image. The amount of copies is based on the count number. The count starts with zero, so for one copy use zero.
+
+

★ImageMagick V7 command: magick input_image -duplicate count output_image

+ +
+ + + + + +
+
Control the compression quality of an image
+

mogrify -quality value image_file.ext

+

Controls the compression quality of JPEG, PNG, HEIC, and WebP image files.

+
+
mogrify
starts the command
+
-quality value
sets the compression quality (1 to 100) of the image file. The default value for JPEG and MPEG files is 92. The default value for PNG and MNG files is 75.
+
+

★ImageMagick V7 command: magick mogrify -quality value image_file.ext

+ +
+ + + + + +
+
Assign a label to an image
+

mogrify -label “%m:%f %wx%h” example.png

+

Assigns a label to the image as it is read.

+
+
mogrify
starts the command
+
-label “%wx%h”
assigns the label 480x216 (width and height) to the image example.png. Other attributes can be assigned as a label. Refer to the Format and Print Image Properties page for a complete list of single letter attribute percent escapes.
+
example.png
takes the image file input
+
+

★ImageMagick V7 command:magick mogrify -label “%wx%h” example.png

+ +
+ + + + +
+
Rotate degrees
+

mogrify -rotate “-180>” example1.png

+

Rotates an image by degrees specified.

+
+
convert
starts the command
+
-rotate “-180>”
rotates the image by 180 degrees, or any integer specified. Any blank space in the background after the image is rotated is filled in with the background color. If the image width is greater than the image height, use > in the command. If the image width is less than height, use <.
+
example1.png
takes the image file input.
+
+

★ImageMagick V7 command: magick mogrify -rotate 180 example1.png

+ +
+ + + + + +
+
Auto Orient Image
+

mogrify -auto-orient input_image.jpg

+

Auto orients an image for suitable viewing.

+
+
mogrify
starts the command
+
-auto-orient
Reads and then resets the orientation setting of the EXIF image profile and then rotates the image 90 degrees to orient the image for correct viewing.
+
input_image.jpg
the image the user wishes to auto orient.
+
+

★ImageMagick V7 command: magick mogrify -auto-orient input_image.jpg

+ +
+ + + + + +
+
Check version of Imagemagick in use
+

convert -version

+

Output the version of Imagemagick in use, the image quality it is using, and origin date.

+
+
convert
starts the command
+
-version
After outputting the above information Image Magick will automatically exit the program.
+
+

★ImageMagick V7 command:magick -version

+ +
+ + + + + +
+
Adjoin image files.
+

convert -adjoin input_image1.ext input_image2.ext output_images.ext

+

Join images into a single multi-image file.

+
+
convert
starts the command
+
-adjoin
Saves multiple input image files into a given output file
+
image1.ext image2.ext
The input images. Note that file formats such as jpeg and png do not support multi-image files.
+
output_images.ext
The output, a multi-image file.
+
+

★ImageMagick V7 command:magick -adjoin input_image1.ext input_image2.ext output_images.ext

+ +
+ + + + + +
+
Command Definitions
+
Convert
The convert command is used to change the composition of an image (i.e. its format, size, position, etc.).
+
Identify:
The identify command is used to give basic information about image file(s) such as format, size, file name, or whether or not the file is incomplete or corrupt.
+
Mogrify:
The mogrify command is similar to the convert command, in that it modifies images, however, it does so to the original image file. This means the original image will be overwritten.
+
Montage:
The montage command creates a composite image out of multiple individual images.
+
Compare:
The compare command allows a user to see the differences between two input images.
+ +
+ + + + + +
+
Further Resources
+

Links to more resources on ImageMagick and version 6.

+

The official website for version 6 can be found here.

+

Another great resource that goes in-depth on the basic commands of ImageMagick 6 can be found here.

+

There is also the Imagemagick subreddit for community support.

+ +
+ + +

flac