On Mac, install Imagemagic:
Download:
Http://www.imagemagick.org/script/binary-releases.php#macosx
Installation:
Create (or choose) a directory to install the "into" and "Change to" directory, for example:
$ CD $HOME
Next, extract the contents of the package. For example:
$ tar xvzf imagemagick-x86_64-apple-darwin13.2.0.tar.gz
Set the MAGICK_HOME
environment variable to the path where you extracted the ImageMagick files. For example:
$ export Magick_home= "$HOME/imagemagick-6.8.9"
If bin
The subdirectory of the extracted package isn't already in your executable search path, add it to your PATH
env Ironment variable. For example:
$ export Path= "$MAGICK _home/bin: $PATH"
Set the DYLD_LIBRARY_PATH
environment variable:
$ export dyld_library_path= "$MAGICK _home/lib/"
Finally, to verify ImageMagick was working properly, type the following on the command line:
$ convert logo:logo.gif$ identify logo.gif$ display logo.gif
Turn PDF files into images
#convert 150 100 800x "file.pdf" "result.jpg"
output the File.pdf file as a result.jpg file, and if the PDF has more than one page, the image is automatically result-0.jpg ', ' result-1.jpg ' ... Form output.
On your Mac, use ImageMagick to turn JPG into black and white TIFF commands:
localhost:~ test$ convert 005.jpg-type bilevel-monochrome-compress group4 005.tif
localhost:~ Test$ convert 005.jpg-monochrome-compress group4 005.tif
localhost:~ Test$ convert 005.jpg-compress group4 005.tif
Reference:
http://www.imagemagick.org/script/command-line-options.php
http://www.imagemagick.org/script/convert.php
Http://linux.chinaunix.net/docs/2006-12-15/3481.shtml
This article is from the "GONE with the Wind" blog, please be sure to keep this source http://h2appy.blog.51cto.com/609721/1567918
Convert images with ImageMagick in Mac