B
bonkura_
Hi,
I want to convert a BufferedImage that has a DirectColorModel such as
TYPE_INT_RGB to a BufferedImage with an IndexColorModel.
Right now I am doing it this way:
BufferedImage buffered = new BufferedImage( width,
height,BufferedImage.TYPE_BYTE_INDEXED);
Graphics2D g2 = buffered.createGraphics();
g2.drawImage( inImage, null, null );
where inImage is an image with a DirectColorModel.
This does work but it worsens the quality of the image. I convert from
IndexColorModel to DirectColorModel this way and that does not incur
any quality problems...
thanx...
I want to convert a BufferedImage that has a DirectColorModel such as
TYPE_INT_RGB to a BufferedImage with an IndexColorModel.
Right now I am doing it this way:
BufferedImage buffered = new BufferedImage( width,
height,BufferedImage.TYPE_BYTE_INDEXED);
Graphics2D g2 = buffered.createGraphics();
g2.drawImage( inImage, null, null );
where inImage is an image with a DirectColorModel.
This does work but it worsens the quality of the image. I convert from
IndexColorModel to DirectColorModel this way and that does not incur
any quality problems...
thanx...