ImageMagick: MagickCore, C API for ImageMagick: Colormap Methods
Author: ImageMagick Studio LLC
Description: Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition resize, rotate, shear, distort and transform images automagically.
Keywords: magickcore, c, api, for, imagemagick:, colormap, methods, ImageMagick, PerlMagick, image processing, OpenMP, software development library, image, photo, software, Magick++, MagickWand

Unix
Mac OS X
iOS
Windows
Processing
Options
Usage
MagickWand
MagickCore
PerlMagick
Magick++
Unix
Windows
Links

# Module colormap Methods

## AcquireImageColormap

AcquireImageColormap() allocates an image colormap and initializes it to a linear gray colorspace. If the image already has a colormap, it is replaced. AcquireImageColormap() returns MagickTrue if successful, otherwise MagickFalse if there is not enough memory.

The format of the AcquireImageColormap method is:

      MagickBooleanType AcquireImageColormap(Image *image,
        const size_t colors)

A description of each parameter follows:

##### image

the image.

##### colors

the number of colors in the image colormap.

## CycleColormap

CycleColormap() displaces an image's colormap by a given number of positions. If you cycle the colormap a number of times you can produce a psychodelic effect.

The format of the CycleColormapImage method is:

      MagickBooleanType CycleColormapImage(Image *image,const ssize_t displace)

A description of each parameter follows:

##### image

the image.

##### displace

displace the colormap this amount.

Discourse Server • Studio