Effect "Color Map" does not support 1D LUTs, only 3D LUTs.
Description:
The Color Map effect is hard-coded to look for LUT_3D_SIZE in the .cube file. If the file contains a 1D LUT instead using LUT_1D_SIZE then the color mapping does not work.
For a specification of .cube file format, see: https://kono.phpage.fr/images/a/a1/Adobe-cube-lut-specification-1.0.pdf
Reproduction Steps:
- Download latest RC candidate binary.
- Launch app image file.
- Add a video clip and drag it to timeline.
- Open Effects tab.
- Drag "Color Map / Lookup" onto the clip.
- Set the cube filename to a file that contains a 3D LUT.
- Observe: color mapping works.
- Change the cube filename to a file that contains a 1D LUT.
- Observe: color mapping does not work.
Expected Behaviour:
Color mapped video, regardless whether a 1D or a 3D map is being used.
Version: 3.4.0 Release Candidate
OS: Ubuntu 25.04
The code in question that hard-codes the 3D LUT support, is here:
https://github.com/OpenShot/libopenshot/blob/develop/src/effects/ColorMap.cpp#L45
if (line.startsWith("LUT_3D_SIZE")) {
And no checks for LUT_1D_SIZE are made.
NOTE: I can attempt to add support for this, and contribute back.
UPDATE: I created a PULL-REQUEST that fixes this.
NOTE: The Color Map reader also ignores the DOMAIN_MIN and DOMAIN_MAX values in the .cube file.
Thanks for the bug report! Appreciate it. I'm working on support for both 1D and 3D LUT files. I've got it mostly working now - but adding a few more unit tests to validate it.
Thanks for the bug report! Appreciate it. I'm working on support for both 1D and 3D LUT files. I've got it mostly working now - but adding a few more unit tests to validate it.
Did you see the pull-request I made?