imagick icon indicating copy to clipboard operation
imagick copied to clipboard

haldClutImage needs documenting

Open Danack opened this issue 4 years ago • 2 comments

In particular how to generate a 'hald clut' as I just tried to use this function, and have no idea how to do that.

Danack avatar Dec 02 '20 16:12 Danack

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);
         }
     }
}

Danack avatar Dec 03 '20 19:12 Danack

Found the origin of the name Hald clut.

Screen Shot 2021-05-09 at 19 49 21

Danack avatar May 09 '21 18:05 Danack