I need to find a way to work out the length and the width of the image (which is a .jpg) I have the length of the file but it is not useful because I want to make an array to store information about each pixel of the image file I am using.
public void getImageData(){
File f= new File("myPicture.jpg");
this.length = (int) f.length();
System.out.println("length of file = " + length);
BufferedImage image = null;
try {
image = ImageIO.read(f);
}
catch (IOException e) {
e.printStackTrace();
}
Help much appreciated!