The definition of Sparse color is that the specified points are fixed. If the point is an actual pixel location (add 0.5)
then that pixel will be guaranteed to have the color specified.
They will only become approximate if you continue processing the resulting gradient image with things such as BLUR.
The thing of greater concern is the lack of other color processing functions. Shepards for example will always have a zero gradient slope at the specified points. Especially on the ends of the curve. Which is not particularly nice for some CLUT uses. It also has a tendancy for the curve to 'dip' toward an average value when far away from any control
points.
For example try this...
Code: Select all
convert -size 20x1000 xc: -sparse-color Shepards \
'0,0 black 0,1000 black
0,200 gray90 0,700 gray90' \
-rotate -90 miff:- | im_profile -
The center of the curve 'sags' downward between the two 90% gray points!
It is not a particularly nice interpolation, and is a 2d interpolation being used to generate a 1D curve.
A better method would be to use Fred Wienhaus's special gradient generator script (above)
Polynomial by contrast typically has the highest gradient slope at ends.