imagick
imagick copied to clipboard
haldClutImage needs documenting
In particular how to generate a 'hald clut' as I just tried to use this function, and have no idea how to do that.
How to generate a hald clut: http://www.quelsolaar.com/technology/clut.html
cube_size = level * level;
image_size = level * level * level;
data = p = malloc((sizeof *data) * image_size * image_size * 3);
for(blue = 0; blue < cube_size; blue++)
{
for(green = 0; green < cube_size; green++)
{
for(red = 0; red < cube_size; red++)
{
*p++ = (float)red / (float)(cube_size - 1);
*p++ = (float)green / (float)(cube_size - 1);
*p++ = (float)blue / (float)(cube_size - 1);
}
}
}
Found the origin of the name Hald clut.
