int
im_buildlut( DOUBLEMASK *input, IMAGE *output )
12 100
14 110
18 120
we generate
100 (12)
105
110
112.5
115
117.5 (17)
the x axis (12 .. 17) is implied. The x/y points don’t need to be sorted: we do that. You can have several Ys ... each becomes a band in the output LUT.