mirror of https://github.com/CrimsonTome/tldr.git
compare,convert,identify,import,magick,mogrify,montage: update page (#10850)
parent
06af42cd0f
commit
1bec8f7247
|
@ -1,12 +1,13 @@
|
|||
# compare
|
||||
|
||||
> View the difference between 2 images.
|
||||
> Create a comparison image to visually annotate the difference between two images.
|
||||
> Part of ImageMagick.
|
||||
> More information: <https://imagemagick.org/script/compare.php>.
|
||||
|
||||
- Compare 2 images:
|
||||
- Compare two images:
|
||||
|
||||
`compare {{image1.png}} {{image2.png}} {{diff.png}}`
|
||||
`compare {{path/to/image1.png}} {{path/to/image2.png}} {{path/to/diff.png}}`
|
||||
|
||||
- Compare 2 images using a custom metric:
|
||||
- Compare two images using the specified metric:
|
||||
|
||||
`compare -verbose -metric {{PSNR}} {{image1.png}} {{image2.png}} {{diff.png}}`
|
||||
`compare -verbose -metric {{PSNR}} {{path/to/image1.png}} {{path/to/image2.png}} {{path/to/diff.png}}`
|
||||
|
|
|
@ -1,36 +1,37 @@
|
|||
# convert
|
||||
|
||||
> ImageMagick image conversion tool.
|
||||
> Image conversion tool.
|
||||
> Part of ImageMagick.
|
||||
> More information: <https://imagemagick.org/script/convert.php>.
|
||||
|
||||
- Convert an image from JPG to PNG:
|
||||
|
||||
`convert {{image.jpg}} {{image.png}}`
|
||||
`convert {{path/to/input_image.jpg}} {{path/to/output_image.png}}`
|
||||
|
||||
- Scale an image 50% its original size:
|
||||
- Scale an image to 50% of its original size:
|
||||
|
||||
`convert {{image.png}} -resize 50% {{image2.png}}`
|
||||
`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 {{image.png}} -resize 640x480 {{image2.png}}`
|
||||
`convert {{path/to/input_image.png}} -resize 640x480 {{path/to/output_image.png}}`
|
||||
|
||||
- Horizontally append images:
|
||||
|
||||
`convert {{image1.png}} {{image2.png}} {{image3.png}} +append {{image123.png}}`
|
||||
`convert {{path/to/image1.png path/to/image2.png ...}} +append {{path/to/output_image.png}}`
|
||||
|
||||
- Vertically append images:
|
||||
|
||||
`convert {{image1.png}} {{image2.png}} {{image3.png}} -append {{image123.png}}`
|
||||
`convert {{path/to/image1.png path/to/image2.png ...}} -append {{path/to/output_image.png}}`
|
||||
|
||||
- Create a GIF from a series of images with 100ms delay between them:
|
||||
|
||||
`convert {{image1.png}} {{image2.png}} {{image3.png}} -delay {{10}} {{animation.gif}}`
|
||||
`convert {{path/to/image1.png path/to/image2.png ...}} -delay {{10}} {{path/to/animation.gif}}`
|
||||
|
||||
- Create an image with nothing but a solid background:
|
||||
- Create an image with nothing but a solid red background:
|
||||
|
||||
`convert -size {{800x600}} "xc:{{#ff0000}}" {{image.png}}`
|
||||
`convert -size {{800x600}} "xc:{{#ff0000}}" {{path/to/image.png}}`
|
||||
|
||||
- Create a favicon from several images of different sizes:
|
||||
|
||||
`convert {{image1.png}} {{image2.png}} {{image3.png}} {{image.ico}}`
|
||||
`convert {{path/to/image1.png path/to/image2.png ...}} {{path/to/favicon.ico}}`
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# identify
|
||||
|
||||
> Command-line utility of Image Magick project to describe the format and characteristics of one or more image files.
|
||||
> Describe the format and characteristics of one or more image files.
|
||||
> Part of ImageMagick.
|
||||
> More information: <https://imagemagick.org/script/identify.php>.
|
||||
|
||||
- Describe the format and basic characteristics of an image:
|
||||
|
@ -11,6 +12,6 @@
|
|||
|
||||
`identify -verbose {{path/to/image}}`
|
||||
|
||||
- Collect dimensions of all JPEG files under current directory:
|
||||
- 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}}`
|
||||
`identify -format "{{%f,%w,%h\n}}" {{*.jpg}} > {{path/to/filelist.csv}}`
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
# import
|
||||
|
||||
> Capture some or all of an X server screen, and save the image to a file.
|
||||
> Part of the ImageMagick library.
|
||||
> Part of ImageMagick.
|
||||
> More information: <https://imagemagick.org/script/import.php>.
|
||||
|
||||
- Capture the entire X server screen in the PostScript image format:
|
||||
- Capture the entire X server screen into a PostScript file:
|
||||
|
||||
`import -window root {{output.postscript}}`
|
||||
`import -window root {{path/to/output.ps}}`
|
||||
|
||||
- Capture contents of a remote X server screen in the PNG format:
|
||||
- Capture contents of a remote X server screen into a PNG image:
|
||||
|
||||
`import -window root -display {{remote_host}}:{{screen}}.{{display}} {{output.png}}`
|
||||
`import -window root -display {{remote_host}}:{{screen}}.{{display}} {{path/to/output.png}}`
|
||||
|
||||
- Capture a specific window, given its ID as displayed by `xwininfo`, into the JPEG format:
|
||||
- Capture a specific window given its ID as displayed by `xwininfo` into a JPEG image:
|
||||
|
||||
`import -window {{window_id}} {{output.jpg}}`
|
||||
`import -window {{window_id}} {{path/to/output.jpg}}`
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
# magick
|
||||
|
||||
> Create, edit, compose, or convert bitmap images.
|
||||
> Create, edit, compose, or convert between image formats.
|
||||
> ImageMagick version 7+. See `convert` for versions 6 and below.
|
||||
> More information: <https://imagemagick.org/>.
|
||||
|
||||
- Convert file type:
|
||||
- Convert between image formats:
|
||||
|
||||
`magick {{image.png}} {{image.jpg}}`
|
||||
`magick {{path/to/input_image.png}} {{path/to/output_image.jpg}}`
|
||||
|
||||
- Resize an image, making a new copy:
|
||||
|
||||
`magick {{input_image.jpg}} -resize {{100x100}} {{output_image.jpg}}`
|
||||
`magick {{path/to/input_image.jpg}} -resize {{100x100}} {{path/to/output_image.jpg}}`
|
||||
|
||||
- Create a GIF using images:
|
||||
- Create a GIF out of all JPG images in the current directory:
|
||||
|
||||
`magick {{*.jpg}} {{images.gif}}`
|
||||
`magick {{*.jpg}} {{path/to/images.gif}}`
|
||||
|
||||
- Create checkerboard pattern:
|
||||
- Create a checkerboard pattern:
|
||||
|
||||
`magick -size {{640x480}} pattern:checkerboard {{checkerboard.png}}`
|
||||
`magick -size {{640x480}} pattern:checkerboard {{path/to/checkerboard.png}}`
|
||||
|
||||
- Convert images to individual PDF pages:
|
||||
- Create a PDF file out of all JPG images in the current directory:
|
||||
|
||||
`magick {{*.jpg}} +adjoin {{page-%d.pdf}}`
|
||||
`magick {{*.jpg}} -adjoin {{path/to/file.pdf}}`
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
# mogrify
|
||||
|
||||
> Perform operations on multiple images, such as resizing, cropping, flipping, and adding effects.
|
||||
> Changes are applied directly to the original file.
|
||||
> Changes are applied directly to the original file. Part of ImageMagick.
|
||||
> More information: <https://imagemagick.org/script/mogrify.php>.
|
||||
|
||||
- Resize all JPEG images in the directory to 50% of their initial size:
|
||||
|
||||
`mogrify -resize {{50%}} {{*.jpg}}`
|
||||
|
||||
- Resize all images starting with "DSC" to 800x600:
|
||||
- Resize all images starting with `DSC` to 800x600:
|
||||
|
||||
`mogrify -resize {{800x600}} {{DSC*}}`
|
||||
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
# montage
|
||||
|
||||
> ImageMagick image montage tool.
|
||||
> Tiles images into a customisable grid.
|
||||
> Tiles images into a customizable grid.
|
||||
> Part of ImageMagick.
|
||||
> More information: <https://imagemagick.org/script/montage.php>.
|
||||
|
||||
- Tile images into a grid, automatically resizing images larger than the grid cell size:
|
||||
|
||||
`montage {{image1.png}} {{image2.jpg}} {{imageN.png}} montage.jpg`
|
||||
`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 {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry +0+0 montage.jpg`
|
||||
`montage {{path/to/image1.jpg path/to/image2.jpg ...}} -geometry {{+0+0}} {{path/to/montage.jpg}}`
|
||||
|
||||
- Set the grid cell size and resize images to fit it before tiling:
|
||||
|
||||
`montage {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry 640x480+0+0 montage.jpg`
|
||||
`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 {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry +0+0 -tile 2x3 montage_%d.jpg`
|
||||
`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 {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry +0+0 -resize 640x480^ -gravity center -crop 640x480+0+0 montage.jpg`
|
||||
`montage {{path/to/image1.jpg path/to/image2.jpg ...}} -geometry {{+0+0}} -resize {{640x480^}} -gravity {{center}} -crop {{640x480+0+0}} {{path/to/montage.jpg}}`
|
||||
|
|
Loading…
Reference in New Issue