tldr/pages/common/mogrify.md

26 lines
727 B
Markdown
Raw Permalink Normal View History

2017-08-20 18:37:03 +01:00
# mogrify
> Perform operations on multiple images, such as resizing, cropping, flipping, and adding effects.
2017-09-11 12:05:15 +01:00
> Changes are applied directly to the original file.
2019-06-04 10:25:14 +01:00
> More information: <https://imagemagick.org/script/mogrify.php>.
2017-08-20 18:37:03 +01:00
- Resize all JPEG images in the directory to 50% of their initial size:
2017-08-20 18:37:03 +01:00
`mogrify -resize {{50%}} {{*.jpg}}`
2017-09-11 12:05:15 +01:00
- Resize all images starting with "DSC" to 800x600:
2017-08-20 18:37:03 +01:00
`mogrify -resize {{800x600}} {{DSC*}}`
- Convert all PNGs in the directory to JPEG:
2017-08-20 18:37:03 +01:00
`mogrify -format {{jpg}} {{*.png}}`
- Halve the saturation of all image files in the current directory:
2017-08-20 18:37:03 +01:00
`mogrify -modulate {{100,50}} {{*}}`
- Double the brightness of all image files in the current directory:
2017-08-20 18:37:03 +01:00
`mogrify -modulate {{200}} {{*}}`