🖥️mogrify
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the mogrify command with important options and switches using examples.
3 minute read
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ███╗ ███╗ ██████╗ ██████╗ ██████╗ ██╗███████╗██╗ ██╗
# ████╗ ████║██╔═══██╗██╔════╝ ██╔══██╗██║██╔════╝╚██╗ ██╔╝
# ██╔████╔██║██║ ██║██║ ███╗██████╔╝██║█████╗ ╚████╔╝
# ██║╚██╔╝██║██║ ██║██║ ██║██╔══██╗██║██╔══╝ ╚██╔╝
# ██║ ╚═╝ ██║╚██████╔╝╚██████╔╝██║ ██║██║██║ ██║
# ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝
# Resize an image proportionally to some specified width or height
mogrify -geometry x31 path/to/image.gif
# Explanation:
# mogrify is part of ImageMagick, an image manipulation software suite
# mogrify manipulates the specified images. If you prefer to keep the original image untouched and write the manipulated image to a different file, simply replace mogrify with convert, the syntax is the same, but the last command line argument will be the target image to write to.
# The -geometry flag is to resize the image, it requires a dimension parameter in the format WIDTHxHEIGHT
# The dimension in this example has no width, which means the image will be resized to height=31 pixels, and the width will be proportional.
# Limitations: ImageMagick is not a standard package, though it is open source and available in many systems.
# Remove EXIF data such as orientation from images
mogrify -strip /path/to/image.jpg
# Explanation: I use this mostly to remove orientation information from images. My problem with orientation information is that some viewers do not support it, and thus do not show the image correctly oriented. Rotating the image does not help, because if I make the image look correct in the viewer that does not support orientation, that will break it in the viewer that does support orientation. The solution is to remove the orientation information and rotate the image appropriately. That way the image will always look the same in all viewers, regardless of support for the orientation information.
# The tool mogrify is part of ImageMagick, an image manipulation software. It manipulates image files and saves the result in the same file. A similar tool in ImageMagick that saves the result of manipulations is convert, you can use it like this:
convert -strip orig.jpg stripped.jpg
# Limitations: The tool is part of ImageMagick, an image manipulation software.
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command mogrify in a clear format. This allows users to quickly access the needed information for mogrify without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for mogrify are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.