Returns the image length in bytes