errors in creating BufferedImage

R

rajesh.rapaka

Hi all,

I am working on 16 - bit images and i am trying to develop a
BufferedImage from the pixels.

i am using
bufImage = new BufferedImage(ComponentColorModel,WritableRaster,
Boolean, HashTable);

But I find the 16 - bit images darker than normal. 8 - bit images made
in this way are fine.

So I scaled my pixels from 16 - bit to 8 - bit. and am continuing the
process. when i am painting the bufferedImage I get and
"ArrayIndexOutofBounds exception".

I dont think there is a problem in the scaling process cause I am also
making and image using MemoryImageSource with the same scaled pixels
and i am getting the image quite well.

What could've been the problem.
Why am i getting the exception??
is there any other way i can show the 16 - bit images brighter.
help !!

regards
Rajesh rapaka.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top