Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
only recently I found out that IM can use Hald CLUTs to process images and I'm now all excited about the possibilities that seem to open up for our team workflow. Personally, I'm having no problem at all work to combine IM with other tools in my workflow... Unfortunately, other member in my team might find that too difficult.
However, I have been thinking: As Photoshop CS6 introduced the possibility to load and apply 3dl files (industry standard 3D LUTs)... wouldn't it be great, if there was a way to easily convert Hald CLUTs to 3D LUTs, so that they could be used in Photoshop as well (by people, who don't have IM installed)? Can IM do that already? Some other software? Or is that conversion infeasible? Am I missing something?
I do not think IM supports PS 3dl files. Do you have any documentation of the format of these 3D luts in Photoshop? Without that, it would be impossible to do any conversion. I have not found anything so far by a Google search. The closest I came was http://www.photoshopessentials.com/phot ... ookup-cs6/ and http://colorlookup.blog.com/archives/374/, which do not give the format.
Any way, if your people do not have IM, then why would they want to convert Hald Luts from IM to PS. They can easily be recreated in PS as 3dl files and saved for later use in PS.
The opposite situation is more logical. If you have some processing PS that you want to duplicate in IM, then you can create a HALD image in IM, process it in PS, then return to IM and use the modified HALD image to do the same processing effect in IM.
I think that they are what I would call "sparse", with a limited number of equally-spaced input values. So no problem creating them from a hald-clut, I would think. But creating a hald-clut from a 3dl would need some work, involving 3-d interpolation.
I'm not sure about the exact format specifications, but usually 3DL files are ASCII based and can be opened with any text editor. They seem to always contain triplets of numbers, of which I am not sure what they mean. But it should - at least in theory - by feasible to do a conversion. Actually, I thought, someone must already have tried to achieve this...
"A Lustre Color 3D LUT represents a color conversion from one color space to another. It applies a transformation to each value of a color cube in RGB space. (...) 3D LUTs use a sophisticated method of mapping color values from different color spaces. (...) The transformation is specified by laying a three-dimensional grid of regularly spaced points (colors) in the 3D input color space and specifying (for each of these particular input colors) the corresponding output color. The transformation of all other colors is approximated using interpolation in the three dimensions. (...)"
Isn't this more or less the same principle that a Hald CLUT in based on?
I think that they are what I would call "sparse", with a limited number of equally-spaced input values. So no problem creating them from a hald-clut, I would think. But creating a hald-clut from a 3dl would need some work, involving 3-d interpolation.
Actually, creating a Hald CLUT from a 3DL should be easy, if you use Photoshop (just apply the 3DL to the identity CLUT). I haven't found a way to go in the other direction, however.
"A Lustre Color 3D LUT represents ...
Yes, that is the general description of a LUT, which includes IM's hald-cluts.
I was thinking about the ease of creation by IM (or a script using IM). As you say, getting Photoshop to create a hald-clut from a 3dl and an identity hald-clut should be trivial.
"A Lustre Color 3D LUT represents a color conversion from one color space to another. It applies a transformation to each value of a color cube in RGB space. (...) 3D LUTs use a sophisticated method of mapping color values from different color spaces. (...) The transformation is specified by laying a three-dimensional grid of regularly spaced points (colors) in the 3D input color space and specifying (for each of these particular input colors) the corresponding output color. The transformation of all other colors is approximated using interpolation in the three dimensions. (...)"
Isn't this more or less the same principle that a Hald CLUT in based on?
Same idea, but there may be many different implementations and formats. Who knows what PS is actually using? They usually keep things pretty proprietary.
If one can get a format specification, then in principle, it should reasonably easy to convert.
One might be able to reverse engineer it, if one could export an identity 3dl file if it is really text format. Then one could see the correspondences in colors and try to figure out the layout of the file in comparison to the Hald lut.