Here you are getting length of the byte array. Not the actual image.
You should use imageLocation.getWidth()
and imageLocation.getHeight()
.
If you have checked the java doc http://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferedImage.html it says that getSubimage method shares the same data array as the original image. That is why you are getting same length for the data array length.