sir,
i want to show a 2D array corresponding to a .jpg/.gif/.png image file in a separate window. suppose i have...
class Image {
protected int width,height;
// 'samples' stores the image pixel values.
protected int[][] samples;
// Constructor: Reads the image from the
// specified file name.
public Image(String filename)
throws Exception { read(filename); }
// Returns the pixel width of the image.
public int getWidth() { return width; }
// Returns the pixel height of the image.
public int getHeight() { return height; }
// Reads the image from the specified file
// name into the 'samples' array. Throws an
// exception if the image is stored in an
// unsupported file format (currently only
// .GIF, .JPG, and .PNG are supported by Sun).
public void read(String filename)
throws Exception {
// Extract the file name suffix...
.......
...........
.............
from the startup java file like..
import java.awt.*;
import javax.imageio.*;
class TestImage {
public static void main(String args[])
throws Exception {
// Create a frame to display the image.
Frame frame = new Frame("Test Image");
frame.setSize(1024,768);
frame.setVisible(true);
Graphics gc = frame.getGraphics();
try {
// Read the image from the file.
Image img = new Image("Horse.jpg");
.........

I want to access the int [][] samples array then want to disply this array values in a separate windo or applet..How to approach......