在网站开发中,对应图片的高质量处理使用ImageMagick的情况比较多。
ImageMagick对应了多平台,多语言。比如java操作图片的时候使用jmaigick就可以了。可以用命令行来操作图片,也可以在具体的程序中通过接口来操作图片。功能非常不错。
主页:http://www.imagemagick.org/script/index.php
具体的安装根据网上的信息就能搞定。linux的时候很多时候还需要安装对应的图片格式处理包。具体信息参照:http://www.imagemagick.org/script/formats.php
概述:
ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety offormats
(over 100) includingDPX,EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. 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.
The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite language. Choose from these interfaces:G2F (Ada),MagickCore
(C), MagickWand (C),ChMagick (Ch),ImageMagickObject (COM+),Magick++
(C++), JMagick (Java),L-Magick (Lisp),NMagick (Neko/haXe),MagickNet
(.NET),PascalMagick (Pascal),PerlMagick (Perl),
MagickWand for PHP (PHP),IMagick (PHP),PythonMagick (Python),RMagick
(Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images dynamically andautomagically.
主要功能:
- Format conversion: convert an image from oneformatto another (e.g. PNG to JPEG).
- Transform: resize, rotate, crop, flip or trim an image.
- Transparency: render portions of an image invisible.
- Draw: add shapes or text to an image.
- Decorate: add a border or frame to an image.
- Special effects: blur, sharpen, threshold, or tint an image.
- Animation: create a GIF animation sequence from a group of images.
- Text & comments: insert descriptive or artistic text in an image.
- Image identification: describe the format and attributes of an image.
- Composite: overlap one image over another.
- Montage: juxtapose image thumbnails on an image canvas.
- Generalized pixel distortion: correct for, or induce image distortions including perspective.
- Morphology of shapes: extract features, describe shapes and recognize patterns in images.
- Motion picture support: read and write the common image formats used in digital film work.
- Image calculator: apply a mathematical expression to an image or image channels.
- Discrete Fourier transform: implements the forward and inverse DFT.
- High dynamic-range images: accurately represent the wide range of intensity levels found in real scenes ranging from the brightest direct sunlight to the deepest darkest shadows.
- Encipher or decipher an image: convert ordinary images into unintelligible gibberish and back again.
- Virtual pixel support: convenient access to pixels outside the image region.
- Large image support: read, process, or write mega-, giga-, or tera-pixel image sizes.
- Threads of execution support: ImageMagick is thread safe and most internal algorithms are OpenMP-enabled to take advantage of speed-ups offered by multicore processor chips.
- Heterogeneous distributed processing: certain algorithms are OpenCL-enabled to take advantage of speed-ups offered by executing in concert across heterogeneous platforms consisting
of CPUs, GPUs, and other processors. - ImageMagick on the iPhone: convert, edit, or compose images on your iPhone.
处理的效果例子如下: