|
From: <HBB...@t-...> - 2007-02-02 22:31:15
|
Ethan Merritt wrote: > I noted out in my feature request for libgd that it was unclear what > sort of interpolation could be done with an indexed colormap. The usual > shading interpolation routines assume either RGB or CMY colorspace. > But I think you've answered that question. The gnuplot PM3D grey > scale palette routines define a single scale within which interpolation > of the index value does make sense. ... for pm3d it does. But the same need not apply for GD at large. PM3D doesn't interpolate colours, it interpolates indices, i.e. it interpolates along a polyline through colour space. The idea being that all resulting colours should still be on that polyline. To give an example, from an RGB palette defined like this: 0.0: blue 0.5: white 1.0: red all colours interpolated by pm3d would currently be pure blue or red at various levels of saturation. A triangle with these three values at its corners would have a pure white streak all along the edge from the white corner to the center of the opposite edge. Actual colour interpolation would yield all kinds of violet with pure white only around the original white vertex. |