[code]
    public double[][][] getArray3DTest(BufferedImage[] bufferedImages) {
        double[][][] array3D;
                final int WIDTH = bufferedImages[0].getWidth();//X dimension
                final int HEIGHT = bufferedImages[0].getHeight();//Y dimension
                final int NUMBER_OF_IMAGES = bufferedImages.length;//Z dimension
                array3D = new double[WIDTH][HEIGHT][NUMBER_OF_IMAGES];
                for(int k = 0; k < NUMBER_OF_IMAGES; k++) {
                        BufferedImage bi = bufferedImages[k];
                        for (int j = 0; j < HEIGHT; j++) {
                                for (int i = 0; i < WIDTH; i++) {
                                                Color color = new 
Color(bi.getRGB(i, j));
                                                /*
                                                 * For gray scale images R=G=B, 
so we take red.
                                                 */
                                                array3D[i][j][k] = 
color.getRed();
                                }
                        }
                }
                return array3D;
        }
[/code]

Please check my above code. I have taken r, g, b values of a set of images to a 
3 dimentional array. Is it possible to create the buffered images from this 
array? That is converting the r g b values to original images? Is it possible? 
Please help.

Thanks aand Regards
Shihab
[Message sent by forum member 'shihabkb' (shihabkb)]

http://forums.java.net/jive/thread.jspa?messageID=339088

===========================================================================
To unsubscribe, send email to lists...@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
lists...@java.sun.com and include in the body of the message "help".

Reply via email to