Hi Vidya,
Do you see the image with too much blue??
If so, than use DataBuffer.TYPE_INT when creating DirectColorModel
and SinglePixelPackedSampleModel.
Hope it helps!
Regards,
Octavian.
Vidya Sagar wrote:
>
> Hi Selman and all,
>Thanks for your responses. I am using a color model
> bcos
If you have a data element for each band seperately then use a
ComponentColorModel.
Vidya Sagar schrieb:
> Hi Selman and all,
>Thanks for your responses. I am using a color model
> bcos, I have R, G, B samples/values individually, and
> not a single pixel value. To get a single pixel value
Hi Selman and all,
Thanks for your responses. I am using a color model
bcos, I have R, G, B samples/values individually, and
not a single pixel value. To get a single pixel value
from three individual values I am using ColorModel.
I have corrected my code, and used DirectColorModel,
and Singl
Daniel Selman wrote:
> Vidya,
>
> I just use something like:
>
> BufferedImage perlinTextureImage = new BufferedImage( MAX_TEXTURE_SIZE,
> MAX_TEXTURE_SIZE, BufferedImage.TYPE_3BYTE_BGR );
>
> I can then use getRGB(), setRGB() to read/write the color data. What are the
> advantages of setting up t
Vidya,
I just use something like:
BufferedImage perlinTextureImage = new BufferedImage( MAX_TEXTURE_SIZE,
MAX_TEXTURE_SIZE, BufferedImage.TYPE_3BYTE_BGR );
I can then use getRGB(), setRGB() to read/write the color data. What are the
advantages of setting up the ColorModel explicitly?
Sincerely
Hi,
>From the BufferedImage.java one can see that DirectColorModel and
ByteInterleavedRaster are not compatible.
What you need is a WritableRaster constructed on a
SinglePixelPackedSampleModel.
For more details see the JavaDoc from DirectColorModel.
Regards,
Octavian Nasarimba
Vidya Sagar wrote
Hi all,
I am creating a buffered image in the code given
below. I am getting the exception shown. Could anyone
suggest some possible correction or any other solution
to it? I need to use the DirectColorModel since I want
to access individual RGB components of each pixel.
cs = ColorSpace.getIn