Mick Barry wrote:
> 
> Hi Robbie,
> 
> I would have thought you could set up an IndexColorModel which maps your
> pixels values to RGB values corresponding to the 216 colour browser
> palette.
> All you need to work out is which RGB palette entry to use for which
> pixel value.

Thanks for the suggestion.  

I imagine it would be quite a straightforward process: since web-safe
colours are multiples of 51 in each of the r, g and b ranges it should
be just a case of analyzing each pixel's r, b and b value and mapping to
the nearest multiple of 51.

The only thing is I don't really know how to go about doing this with an
IndexColorModel!

Could you give me an idea as to how to make a start?


Robbie
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/

Reply via email to