GraphicsMagick

- Home
- Project
- Download
- Install
- Source
- News
- Utilities
- Programming
- Reference

# hclut

## Apply Hald CLUT to image

Contents

- HaldClutImage

# HaldClutImage

## Synopsis

    MagickPassFail HaldClutImage( Image *image, const Image *clut );

## Description

The HaldClutImage() method apply a color lookup table (Hald CLUT) to the image. The fundamental principle of the Hald CLUT algorithm is that application of an identity CLUT causes no change to the input image, but an identity CLUT image which has had its colors transformed in some way (e.g. in Adobe Photoshop) may be used to implement an identical transform on any other image.

The minimum CLUT level is 2, and the maximum depends on available memory (largest successfully tested is 24). A CLUT image is required to have equal width and height. A CLUT of level 8 is an image of dimension 512x512, a CLUT of level 16 is an image of dimension 4096x4096. Interpolation is used so extremely large CLUT images are not required.

GraphicsMagick provides an 'identity' coder which may be used to generate identity HLUTs. For example, reading from "identity:8" creates an identity CLUT of order 8.

The Hald CLUT algorithm has been developed by Eskil Steenberg as described at http://www.quelsolaar.com/technology/clut.html, and was adapted for GraphicsMagick by Clément Follet with support from Cédric Lejeune of Workflowers.

The format of the HaldClutImage method is:

    MagickPassFail HaldClutImage( Image *image, const Image *clut );

A description of each parameter follows:

image:
  The image.
clut:
  The color lookup table image