[JAVA2D] GlyphVector API

2002-04-05 Thread SathishKumar S
Hi I have a doubt in the following api getPixelBounds(frc,x,y) The above method in GlyphVector Class returns a rectangle when the GlyphVector is rendered in graphics at x,y. When I call getX and getY on the rectangle object I get the offset x, y values. Now again if I call getBounds on the

[JAVA2D] convert array of pixel to bufferedimage

2002-04-05 Thread Johnny Man
hi! I have a 1D array(size:1*262144) whcih convert from a 512*512 2D image. After several operations with each pixel, I want to change this 1D array back to 2D arary (512*512) and save this 2D array as a bufferedimage Can any one give me a hand? Thank You.

[JAVA2D] Grayscale

2002-04-05 Thread Nuno Emanuel Figueiredo de Carvalho
Hi, Could someone help me on getting a grayscale image from a BufferedImage ? I already checked some source code from web but it doesn't work. Please help me Regards, Nuno === To unsubscribe, send

Re: [JAVA2D] Grayscale

2002-04-05 Thread Dmitri Trembovetski
Hi Nuno, you can do this, for example, this way: BufferedImage bi = ..; // your image BufferedImage grayBi = new BufferedImage(bi.getWidth(), getHeight(), BufferedImage.TYPE_BYTE_GRAY); Graphics g = grayBi.getGraphics(); g.drawImage(bi, 0,