Re: [JAVA3D] Buffered Image creation (Further)

2002-04-05 Thread Octavian Nasarimba
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

Re: [JAVA3D] Buffered Image creation (Further)

2002-04-04 Thread Dipl. Ing. Paul Szawlowski
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

[JAVA3D] Buffered Image creation (Further)

2002-04-04 Thread Vidya Sagar
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

Re: [JAVA3D] Buffered Image creation

2002-04-04 Thread Justin Couch
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

Re: [JAVA3D] Buffered Image creation

2002-04-04 Thread Daniel Selman
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

Re: [JAVA3D] Buffered Image creation

2002-04-04 Thread Octavian Nasarimba
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

[JAVA3D] Buffered Image creation

2002-04-04 Thread Vidya Sagar
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