DEV Community

Cover image for Image Magic K : Cheat Sheet
Yellow Coder
Yellow Coder

Posted on

1

Image Magic K : Cheat Sheet

ImageMagick is a powerful tool for image manipulation. This cheat sheet provides a quick reference to common commands and their purposes.

Table of Contents

  1. Basic Commands
  2. Image Conversion
  3. Image Transformation
  4. Image Effects
  5. Text and Drawing

Basic Commands

Command Purpose
magick Main command to invoke ImageMagick.
magick identify Display image information.
magick convert Convert images from one format to another.
magick mogrify Batch process images.

Image Conversion

Command Purpose
magick input.png output.jpg Convert PNG to JPG.
magick input.tiff output.png Convert TIFF to PNG.
magick input.gif output.webp Convert GIF to WebP.

Image Transformation

Command Purpose
magick input.jpg -resize 800x600 output.jpg Resize image to 800x600.
magick input.jpg -rotate 90 output.jpg Rotate image by 90 degrees.
magick input.jpg -crop 100x100+10+10 output.jpg Crop image to 100x100 starting at (10,10).

Image Effects

Command Purpose
magick input.jpg -blur 0x8 output.jpg Apply blur effect.
magick input.jpg -sharpen 0x3 output.jpg Sharpen the image.
magick input.jpg -sepia-tone 80% output.jpg Apply sepia tone effect.

Text and Drawing

Command Purpose
magick input.jpg -gravity center -pointsize 36 -draw "text 0,0 'Sample Text'" output.jpg Add centered text to image.
magick input.jpg -fill blue -draw "rectangle 10,10 100,100" output.jpg Draw a blue rectangle.


Conclusion

This cheat sheet provides a quick reference to common ImageMagick commands. For more detailed information, refer to the official documentation.

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay