ImageMagick

 
 

Open Source C Library to Create & Convert Images

Create, edit, compose, read and convert Bitmap images using free C  API. It allows to resize, flip, mirror, rotate, distort, shear and transform images inside C apps.

The ImageMagick is an open source library that gives software developers the power to include image processing capabilities inside their own C applications. The library is cross-platform and can smoothly run on runs on Linux, Windows, Mac Os X, iOS, Android OS, and many others. It has included support for reading, displaying, creating, converting, modifying, and modifying raster images using C code.

One great feature of ImageMagick is its capability to accurately and professionally convert images between different leading file formats.  The library has included support for over 200 image file formats such as JPEG, PNG, GIF, HEIC, Exif, TIFF, CGM, DPX, EXR, WebP, Postscript, PDF, SVG and many more.  The library has also provided support for drawing as well as graphics and animated graphics with ease.

The library is very feature rich and has included support for some common image processing features such as image resizing and flipping, image mirroring and rotating, distorting, transform images, image colors adjustment, applying various special effects blur or sharpen or threshold, image gradients, canny edge detection draw text, lines, polygons, ellipses, using mathematical expression and many more. Recently the library has also included support for extracting text from images using OCR.

Previous Next

Getting Started with ImageMagick

Clone the latest sources with using the following command

Install ImageMagick via GitHub.

 git clone https://github.com/ImageMagick/ImageMagick.git 

Or use the following command to install it.

Install ImageMagick via RPM.

$ rpm -Uvh ImageMagick-libs-7.0.10-60.x86_64.rpm  

Convert Image to Other Formats

The open source C library ImageMagick enables software programmers to convert images to other supported file formats inside their own apps. Users need to provide the format parameter before converting to another format.  The library internally converts the image to other formats earlier, before applying the transformations. The library supports conversion to several popular image formats such as BMP, CMYK, GIF, JPEG, PBM, PNG, RGB, SVG, TIFF, and XPM formats. One great aspect of the library is the ease of use while converting the image. It also provides the ability to reduce the size of the image and apply different effects before writing it in the desired format.

Image Gradients Support using C API

The open source C library ImageMagick enables software developers to create image gradients of multiple colors using C commands. You can easily create a gradual blend of one or multiple colors using horizontal, vertical, circular, or elliptical shapes. The library has enhanced the gradients through the use of several –defines such as specify the direction of the linear gradient, Identifies coordinates of the center point for the radial gradient,  Restrict the gradient to a larger or smaller region than the image dimensions, and so on.  Moreover, for non-linear Grayscale gradients, please add -colorspace RGB -colorspace gray before saving the output.

Apply Special Effects to Images via C

The open source C library ImageMagick has provided functionality for applying different types of effects to images. It has provided several important functions such as blurring, sharpening, threshold, creating shadows, feathering shapes, or tinting an image using a coupe of lines of C code. There some special blur effects like radio blur and motion blur are also supported.

Large Images Support

The C library ImageMagick has provided support for working with very large images. It enables developers to open, read, process, or write images upto Mega-, Giga-, or Tera-pixel sizes inside their own image processing applications.  The library allows resizing an image to a quarter million pixels square.  While working with large images you need to make sure the availability of large memory resources. If the default temporary disk partition is small then guide ImageMagick to use another partition with sufficient amount of free space.