Skip to content

Commit

Permalink
Merge pull request #6691 from cgohlke/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Oct 27, 2022
2 parents d3b471b + d97db54 commit 10aa3bd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/libImaging/ColorLUT.c
Expand Up @@ -7,8 +7,8 @@
#define PRECISION_BITS (16 - 8 - 2)
#define PRECISION_ROUNDING (1 << (PRECISION_BITS - 1))

/* 8 scales are multiplied on byte.
6 max index in the table
/* 8 - scales are multiplied on byte.
6 - max index in the table
(max size is 65, but index 64 is not reachable) */
#define SCALE_BITS (32 - 8 - 6)
#define SCALE_MASK ((1 << SCALE_BITS) - 1)
Expand Down Expand Up @@ -44,14 +44,14 @@ table_index3D(int index1D, int index2D, int index3D, int size1D, int size1D_2D)
Transforms colors of imIn using provided 3D lookup table
and puts the result in imOut. Returns imOut on success or 0 on error.
imOut, imIn images, should be the same size and may be the same image.
imOut, imIn - images, should be the same size and may be the same image.
Should have 3 or 4 channels.
table_channels number of channels in the lookup table, 3 or 4.
table_channels - number of channels in the lookup table, 3 or 4.
Should be less or equal than number of channels in imOut image;
size1D, size_2D and size3D dimensions of provided table;
table flat table,
array with table_channels × size1D × size2D × size3D elements,
where channels are changed first, then 1D, then 2D, then 3D.
size1D, size_2D and size3D - dimensions of provided table;
table - flat table,
array with table_channels * size1D * size2D * size3D elements,
where channels are changed first, then 1D, then 2D, then 3D.
Each element is signed 16-bit int where 0 is lowest output value
and 255 << PRECISION_BITS (16320) is highest value.
*/
Expand Down

0 comments on commit 10aa3bd

Please sign in to comment.