ImageMagick: MagickCore, C API for ImageMagick: Dealing with Image Colorspaces
Author: ImageMagick Studio LLC
Description: 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, 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.
Keywords: magickcore, c, api, for, imagemagick:, dealing, with, image, colorspaces, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert

SetImageColorspace • TransformImageColorspace

## SetImageColorspace

SetImageColorspace() sets the colorspace member of the Image structure.

The format of the SetImageColorspace method is:

    MagickBooleanType SetImageColorspace(Image *image,
      const ColorspaceType colorspace)

A description of each parameter follows:

image
  the image.
colorspace
  the colorspace.

## TransformImageColorspace

TransformImageColorspace() transforms an image colorspace.

The format of the TransformImageColorspace method is:

    MagickBooleanType TransformImageColorspace(Image *image,
      const ColorspaceType colorspace)

A description of each parameter follows:

image
  the image.
colorspace
  the colorspace.