2

Is there a way to import a Technicolor CineStyle S-curve lookup table in Gimp->Color->Curves?

The lookup table is just a text file with 256 lines, with a numeric value (0..255) on each line:

0    ...    17    18    18    19    20    21    22    ...    244    244    245    246    246    247    247    248    ...    255

Looking at the way Gimp saves Curves settings, it creates a more verbose file:

# GIMP curves tool settings
(time 0)
(channel value)
(curve
    (curve-type smooth)
    (n-points 17)
    (points 34 -1.000000 -1.000000 0.054878 0.000000 ... -1.000000 -1.000000)
    (n-samples 256)
    (samples 256 0.000000 0.000000 0.000000 ... ))
(time 0)
(channel red)
(curve
    (curve-type smooth)
    (n-points 17)
    (points 34 0.000000 0.000000 ...

and so on for the Green, blue and alpha channel

Is there a way to make Gimp accept the lookup table from sample 1 or is there a script that converts it to the format in sample 2?

  • I am ready to write a script to do the conversion myself, but I don't know what (n-points 17) and (points 34... values mean yet, so I am hoping there is already a solution. – Mike Moe May 30 '11 at 20:09
3

Here is what I did:

Given the input file with one number per line:

0    ...    17    18    18    19    20    21    22    ...    244    244    245    246    246    247    247    248    ...    255

I copied it into Spreadsheet, divided each number by 255, and formatted all the values to 6 decimal places.

After that, I edited a saved Gimp curve, removed the Red, Green, Blue and Alpha channels and the points used to define the curve, replaced the 256 values with the new ones from Spreadsheet.

This is what it looks like:

# GIMP curves tool settings

(time 0) (channel value) (curve (curve-type smooth) (n-samples 256) (samples 256 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.003922 0.003922 0.003922 0.003922 0.003922 0.007843 0.007843 0.007843 0.011765 0.011765 0.011765 0.015686 0.015686 0.019608 0.019608 0.019608 0.023529 0.023529 0.027451 0.031373 0.031373 0.035294 0.035294 0.039216 0.039216 0.043137 0.047059 0.047059 0.050980 0.054902 0.058824 0.058824 0.062745 0.066667 0.070588 0.070588 0.074510 0.078431 0.082353 0.086275 0.090196 0.094118 0.098039 0.101961 0.101961 0.105882 0.109804 0.113725 0.117647 0.125490 0.129412 0.133333 0.137255 0.141176 0.145098 0.149020 0.152941 0.156863 0.160784 0.168627 0.172549 0.176471 0.180392 0.184314 0.192157 0.196078 0.200000 0.203922 0.211765 0.215686 0.219608 0.227451 0.231373 0.235294 0.243137 0.247059 0.250980 0.258824 0.262745 0.266667 0.274510 0.278431 0.286275 0.290196 0.294118 0.301961 0.305882 0.313725 0.317647 0.325490 0.329412 0.337255 0.341176 0.349020 0.352941 0.360784 0.364706 0.372549 0.376471 0.384314 0.388235 0.396078 0.400000 0.407843 0.411765 0.419608 0.427451 0.431373 0.439216 0.443137 0.450980 0.454902 0.462745 0.466667 0.474510 0.482353 0.486275 0.494118 0.498039 0.505882 0.509804 0.517647 0.525490 0.529412 0.537255 0.541176 0.549020 0.552941 0.560784 0.568627 0.572549 0.580392 0.584314 0.592157 0.596078 0.603922 0.607843 0.615686 0.619608 0.627451 0.631373 0.639216 0.643137 0.650980 0.654902 0.662745 0.666667 0.674510 0.678431 0.686275 0.690196 0.698039 0.701961 0.709804 0.713725 0.717647 0.725490 0.729412 0.737255 0.741176 0.745098 0.752941 0.756863 0.760784 0.768627 0.772549 0.776471 0.784314 0.788235 0.792157 0.800000 0.803922 0.807843 0.811765 0.819608 0.823529 0.827451 0.831373 0.835294 0.839216 0.847059 0.850980 0.854902 0.858824 0.862745 0.866667 0.870588 0.874510 0.878431 0.882353 0.886275 0.890196 0.894118 0.898039 0.901961 0.905882 0.909804 0.913725 0.917647 0.921569 0.921569 0.925490 0.929412 0.933333 0.937255 0.937255 0.941176 0.945098 0.949020 0.949020 0.952941 0.956863 0.956863 0.960784 0.964706 0.964706 0.968627 0.968627 0.972549 0.972549 0.976471 0.976471 0.980392 0.980392 0.984314 0.984314 0.988235 0.988235 0.988235 0.992157 0.992157 0.992157 0.992157 0.996078 0.996078 0.996078 0.996078 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000)) # end of curves tool settings

When imported into Gimp, this is how the curve looks like: Gimp color curves

2

Description of the format can be found in video.gimp.windows.user usenet group archive, if that's any help. The syntax of the file is apparently some dialect of Scheme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.