Jul. 14th, 2024
2024年 6月 9日

Post: ImageMagick


Published 12:06 Jun 08, 2013.

Created by @ezra. Categorized in #Technology, and tagged as #UNIX/Linux.

Source format: Markdown

Table of Content

ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.


To install ImageMagick, I recommend MacPorts which custom builds ImageMagick in your environment.

PKG installer is the simplest way to install MacPorts on a OS X system.

Also, you can simply type this to install Homebrew:

/usr/bin/ruby -e "$(curl -fsSL"

For me, I prefer MacPorts, just type:

sudo port install ImageMagick

This may take a while. The port command downloads ImageMagick and many of its delegate libraries and configures, builds, and installs ImageMagick automagically.

Get Started

To get started, lets convert an image in the JPEG format to PNG:

convert rose.jpg rose.png

Next, we reduce the image size before it is written to the PNG format:

convert rose.jpg -resize 50% rose.png

You can combine multiple image-processing operations to produce complex results:

convert -size 320x85 canvas:none -font Bookman-DemiItalic -pointsize 72 \
  -draw "text 25,60 \'Magick\'" -channel RGBA -blur 0x6 -fill darkred -stroke magenta \
  -draw "text 20,55 \'Magick\'" fuzzy-magick.png

or here we resize an image with improved quality:

convert input.png -colorspace RGB +sigmoidal-contrast 11.6933 \
  -define filter:filter=Sinc -define filter:window=Jinc -define filter:lobes=3 \
  -resize 400% -sigmoidal-contrast 11.6933 -colorspace sRGB output.png');
Pinned Message
I'm looking for a SOFTWARE PROJECT DIRECTOR / SOFTWARE R&D DIRECTOR position in a fresh and dynamic company. I would like to gain the right experience and extend my skills while working in great teams and big projects.
Feel free to contact me.
For more information, please view online résumé or download PDF
本人正在寻求任职 软件项目经理 / 软件技术经理 岗位的机会, 希望加⼊某个新鲜⽽充满活⼒的公司。
如有意向请随时 与我联系
更多信息请 查阅在线简历下载 PDF