diff --git a/pages/common/compare.md b/pages/common/compare.md index fad9b0580c..8c11516d59 100644 --- a/pages/common/compare.md +++ b/pages/common/compare.md @@ -1,13 +1,7 @@ # compare -> Create a comparison image to visually annotate the difference between two images. -> Part of ImageMagick. -> More information: . +> This command is an alias of `magick compare`. -- Compare two images: +- View documentation for the original command: -`compare {{path/to/image1.png}} {{path/to/image2.png}} {{path/to/diff.png}}` - -- Compare two images using the specified metric: - -`compare -verbose -metric {{PSNR}} {{path/to/image1.png}} {{path/to/image2.png}} {{path/to/diff.png}}` +`tldr magick compare` diff --git a/pages/common/convert.md b/pages/common/convert.md index c12d33491a..510dfdd6c8 100644 --- a/pages/common/convert.md +++ b/pages/common/convert.md @@ -1,37 +1,9 @@ # convert -> Convert between image formats, scale, join, and create images, and much more. -> Part of ImageMagick. -> More information: . +> This command is an alias of `magick convert`. +> Note: this alias is deprecated since ImageMagick 7. It has been replaced by `magick`. +> Use `magick convert` if you need to use the old tool in versions 7+. -- Convert an image from JPEG to PNG: +- View documentation for the original command: -`convert {{path/to/input_image.jpg}} {{path/to/output_image.png}}` - -- Scale an image to 50% of its original size: - -`convert {{path/to/input_image.png}} -resize 50% {{path/to/output_image.png}}` - -- Scale an image keeping the original aspect ratio to a maximum dimension of 640x480: - -`convert {{path/to/input_image.png}} -resize 640x480 {{path/to/output_image.png}}` - -- Scale an image to have a specified file size: - -`convert {{path/to/input_image.png}} -define jpeg:extent=512kb {{path/to/output_image.jpg}}` - -- Vertically/Horizontally append images: - -`convert {{path/to/image1.png path/to/image2.png ...}} {{-append|+append}} {{path/to/output_image.png}}` - -- Create a GIF from a series of images with 100ms delay between them: - -`convert {{path/to/image1.png path/to/image2.png ...}} -delay {{10}} {{path/to/animation.gif}}` - -- Create an image with nothing but a solid red background: - -`convert -size {{800x600}} "xc:{{#ff0000}}" {{path/to/image.png}}` - -- Create a favicon from several images of different sizes: - -`convert {{path/to/image1.png path/to/image2.png ...}} {{path/to/favicon.ico}}` +`tldr magick convert` diff --git a/pages/common/identify.md b/pages/common/identify.md index f6a54ebc41..96e24b4ebe 100644 --- a/pages/common/identify.md +++ b/pages/common/identify.md @@ -1,17 +1,7 @@ # identify -> Describe the format and characteristics of image files. -> Part of ImageMagick. -> More information: . +> This command is an alias of `magick identify`. -- Describe the format and basic characteristics of an image: +- View documentation for the original command: -`identify {{path/to/image}}` - -- Describe the format and verbose characteristics of an image: - -`identify -verbose {{path/to/image}}` - -- Collect dimensions of all JPEG files in the current directory and save them into a CSV file: - -`identify -format "{{%f,%w,%h\n}}" {{*.jpg}} > {{path/to/filelist.csv}}` +`tldr magick identify` diff --git a/pages/common/import.md b/pages/common/import.md index b6430003a5..6522149bac 100644 --- a/pages/common/import.md +++ b/pages/common/import.md @@ -1,17 +1,7 @@ # import -> Capture some or all of an X server screen, and save the image to a file. -> Part of ImageMagick. -> More information: . +> This command is an alias of `magick import`. -- Capture the entire X server screen into a PostScript file: +- View documentation for the original command: -`import -window root {{path/to/output.ps}}` - -- Capture contents of a remote X server screen into a PNG image: - -`import -window root -display {{remote_host}}:{{screen}}.{{display}} {{path/to/output.png}}` - -- Capture a specific window given its ID as displayed by `xwininfo` into a JPEG image: - -`import -window {{window_id}} {{path/to/output.jpg}}` +`tldr magick import` diff --git a/pages/common/magick-compare.md b/pages/common/magick-compare.md new file mode 100644 index 0000000000..2b8f22238f --- /dev/null +++ b/pages/common/magick-compare.md @@ -0,0 +1,13 @@ +# magick compare + +> Create a comparison image to visually annotate the difference between two images. +> See also: `magick`. +> More information: . + +- Compare two images: + +`magick compare {{path/to/image1.png}} {{path/to/image2.png}} {{path/to/diff.png}}` + +- Compare two images using the specified metric: + +`magick compare -verbose -metric {{PSNR}} {{path/to/image1.png}} {{path/to/image2.png}} {{path/to/diff.png}}` diff --git a/pages/common/magick-convert.md b/pages/common/magick-convert.md new file mode 100644 index 0000000000..447d4bb9fc --- /dev/null +++ b/pages/common/magick-convert.md @@ -0,0 +1,37 @@ +# magick convert + +> Convert between image formats, scale, join, and create images, and much more. +> Note: this tool (previously `convert`) has been replaced by `magick` in ImageMagick 7+. +> More information: . + +- Convert an image from JPEG to PNG: + +`magick convert {{path/to/input_image.jpg}} {{path/to/output_image.png}}` + +- Scale an image to 50% of its original size: + +`magick convert {{path/to/input_image.png}} -resize 50% {{path/to/output_image.png}}` + +- Scale an image keeping the original aspect ratio to a maximum dimension of 640x480: + +`magick convert {{path/to/input_image.png}} -resize 640x480 {{path/to/output_image.png}}` + +- Scale an image to have a specified file size: + +`magick convert {{path/to/input_image.png}} -define jpeg:extent=512kb {{path/to/output_image.jpg}}` + +- Vertically/Horizontally append images: + +`magick convert {{path/to/image1.png path/to/image2.png ...}} {{-append|+append}} {{path/to/output_image.png}}` + +- Create a GIF from a series of images with 100ms delay between them: + +`magick convert {{path/to/image1.png path/to/image2.png ...}} -delay {{10}} {{path/to/animation.gif}}` + +- Create an image with nothing but a solid red background: + +`magick convert -size {{800x600}} "xc:{{#ff0000}}" {{path/to/image.png}}` + +- Create a favicon from several images of different sizes: + +`magick convert {{path/to/image1.png path/to/image2.png ...}} {{path/to/favicon.ico}}` diff --git a/pages/common/magick-identify.md b/pages/common/magick-identify.md new file mode 100644 index 0000000000..f9cd7aadc4 --- /dev/null +++ b/pages/common/magick-identify.md @@ -0,0 +1,17 @@ +# magick identify + +> Describe the format and characteristics of image files. +> See also: `magick`. +> More information: . + +- Describe the format and basic characteristics of an image: + +`magick identify {{path/to/image}}` + +- Describe the format and verbose characteristics of an image: + +`magick identify -verbose {{path/to/image}}` + +- Collect dimensions of all JPEG files in the current directory and save them into a CSV file: + +`magick identify -format "{{%f,%w,%h\n}}" {{*.jpg}} > {{path/to/filelist.csv}}` diff --git a/pages/common/magick-import.md b/pages/common/magick-import.md new file mode 100644 index 0000000000..6ad245c1de --- /dev/null +++ b/pages/common/magick-import.md @@ -0,0 +1,17 @@ +# magick import + +> Capture some or all of an X server screen and save the image to a file. +> See also: `magick`. +> More information: . + +- Capture the entire X server screen into a PostScript file: + +`magick import -window root {{path/to/output.ps}}` + +- Capture contents of a remote X server screen into a PNG image: + +`magick import -window root -display {{remote_host}}:{{screen}}.{{display}} {{path/to/output.png}}` + +- Capture a specific window given its ID as displayed by `xwininfo` into a JPEG image: + +`magick import -window {{window_id}} {{path/to/output.jpg}}` diff --git a/pages/common/magick-mogrify.md b/pages/common/magick-mogrify.md new file mode 100644 index 0000000000..547261d244 --- /dev/null +++ b/pages/common/magick-mogrify.md @@ -0,0 +1,26 @@ +# magick mogrify + +> Perform operations on multiple images, such as resizing, cropping, flipping, and adding effects. +> Changes are applied directly to the original file. +> See also: `magick`. +> More information: . + +- Resize all JPEG images in the directory to 50% of their initial size: + +`magick mogrify -resize {{50%}} {{*.jpg}}` + +- Resize all images starting with `DSC` to 800x600: + +`magick mogrify -resize {{800x600}} {{DSC*}}` + +- Convert all PNGs in the directory to JPEG: + +`magick mogrify -format {{jpg}} {{*.png}}` + +- Halve the saturation of all image files in the current directory: + +`magick mogrify -modulate {{100,50}} {{*}}` + +- Double the brightness of all image files in the current directory: + +`magick mogrify -modulate {{200}} {{*}}` diff --git a/pages/common/magick-montage.md b/pages/common/magick-montage.md new file mode 100644 index 0000000000..9941a63dab --- /dev/null +++ b/pages/common/magick-montage.md @@ -0,0 +1,25 @@ +# magick montage + +> Tile images into a customizable grid. +> See also: `magick`. +> More information: . + +- Tile images into a grid, automatically resizing images larger than the grid cell size: + +`magick montage {{path/to/image1.jpg path/to/image2.jpg ...}} {{path/to/montage.jpg}}` + +- Tile images into a grid, automatically calculating the grid cell size from the largest image: + +`magick montage {{path/to/image1.jpg path/to/image2.jpg ...}} -geometry {{+0+0}} {{path/to/montage.jpg}}` + +- Specify the grid cell size and resize images to fit it before tiling: + +`magick montage {{path/to/image1.jpg path/to/image2.jpg ...}} -geometry {{640x480+0+0}} {{path/to/montage.jpg}}` + +- Limit the number of rows and columns in the grid, causing input images to overflow into multiple output montages: + +`magick montage {{path/to/image1.jpg path/to/image2.jpg ...}} -geometry {{+0+0}} -tile {{2x3}} {{montage_%d.jpg}}` + +- Resize and crop images to fill their grid cells before tiling: + +`magick montage {{path/to/image1.jpg path/to/image2.jpg ...}} -geometry {{+0+0}} -resize {{640x480^}} -gravity {{center}} -crop {{640x480+0+0}} {{path/to/montage.jpg}}` diff --git a/pages/common/magick.md b/pages/common/magick.md index 9ef73fa434..2cc33e8651 100644 --- a/pages/common/magick.md +++ b/pages/common/magick.md @@ -1,8 +1,9 @@ # magick > Create, edit, compose, or convert between image formats. -> ImageMagick version 7+. See `convert` for versions 6 and below. -> More information: . +> This tool replaces `convert` in ImageMagick 7+. See `magick convert` to use the old tool in versions 7+. +> Some subcommands, such as `mogrify` have their own usage documentation. +> More information: . - Convert between image formats: diff --git a/pages/common/mogrify.md b/pages/common/mogrify.md index b43a240ae9..b06b416227 100644 --- a/pages/common/mogrify.md +++ b/pages/common/mogrify.md @@ -1,25 +1,7 @@ # mogrify -> Perform operations on multiple images, such as resizing, cropping, flipping, and adding effects. -> Changes are applied directly to the original file. Part of ImageMagick. -> More information: . +> This command is an alias of `magick mogrify`. -- Resize all JPEG images in the directory to 50% of their initial size: +- View documentation for the original command: -`mogrify -resize {{50%}} {{*.jpg}}` - -- Resize all images starting with `DSC` to 800x600: - -`mogrify -resize {{800x600}} {{DSC*}}` - -- Convert all PNGs in the directory to JPEG: - -`mogrify -format {{jpg}} {{*.png}}` - -- Halve the saturation of all image files in the current directory: - -`mogrify -modulate {{100,50}} {{*}}` - -- Double the brightness of all image files in the current directory: - -`mogrify -modulate {{200}} {{*}}` +`tldr magick mogrify` diff --git a/pages/common/montage.md b/pages/common/montage.md index f468877745..12bd082e82 100644 --- a/pages/common/montage.md +++ b/pages/common/montage.md @@ -1,25 +1,7 @@ # montage -> Tiles images into a customizable grid. -> Part of ImageMagick. -> More information: . +> This command is an alias of `magick montage`. -- Tile images into a grid, automatically resizing images larger than the grid cell size: +- View documentation for the original command: -`montage {{path/to/image1.jpg path/to/image2.jpg ...}} {{path/to/montage.jpg}}` - -- Tile images into a grid, automatically calculating the grid cell size from the largest image: - -`montage {{path/to/image1.jpg path/to/image2.jpg ...}} -geometry {{+0+0}} {{path/to/montage.jpg}}` - -- Specify the grid cell size and resize images to fit it before tiling: - -`montage {{path/to/image1.jpg path/to/image2.jpg ...}} -geometry {{640x480+0+0}} {{path/to/montage.jpg}}` - -- Limit the number of rows and columns in the grid, causing input images to overflow into multiple output montages: - -`montage {{path/to/image1.jpg path/to/image2.jpg ...}} -geometry {{+0+0}} -tile {{2x3}} {{montage_%d.jpg}}` - -- Resize and crop images to fill their grid cells before tiling: - -`montage {{path/to/image1.jpg path/to/image2.jpg ...}} -geometry {{+0+0}} -resize {{640x480^}} -gravity {{center}} -crop {{640x480+0+0}} {{path/to/montage.jpg}}` +`tldr magick montage`