A very complete and simple script to resize or convert your CLUT images to CUBE format and viceversa.
Do you like this project? Support it by donating
- Paypal: Donate or paypal.me/michelerenzullo
- Bitcoin: 1K9RF3s4aocmaRbh2Zu2FuHjrcg5BNeDxU
- Auto-detect input format
- Auto-resize not perfect square LUT size(example #33, #17...)
- Flip RGB values
- Change size and shape of your LUT (example Spark AR LUTs to Lens Studio 1x16 LUTs)
- Generate identity CLUT
- Read all types of CLUT
- Two type of interpolation: Tetrahedral or Nearest
Square:
Square one-row:
Hald:
- Python 3
- Numpy
- Pillow
$ pip install numpy pillow
$ LUTify.py -h
usage: LUTify.py [-h] [--input INPUT] [--output OUTPUT]
[--format {hald,square}] [--identity] [--size SIZE]
[--method {nearest,tetrahedral}] [--rows ROWS] [--flip]
...
-i INPUT
/-o OUTPUT
supports .CUBE, .PNG, .JPG, .TIFF-id IDENTITY
generate a CLUT identity-f FORMAT
"hald" or "square", override default output:- if output is CUBE or "identity", default format is "hald"
- if input is CUBE and output is image the default format is "hald"
- if input is image and output is image default format will be automatically determinated as the opposite of the input format.
-s SIZE
choose your CLUT size or LUT size overriding input value.-m METHOD
the method of interpolation when resizing between "tetrahedral"(default) and "nearest"-r ROWS
number of rows when output is square-ud FLIP
flip upside down RGB values
If you would like to convert your Spark AR LUTs to Lens Studio:
$ LUTify.py -i "SparkAR_SQUARE.png" -o "LensStudio_SQUARE.png" -s 4 -r 1 -f square --flip