Improved error messages and handling. Added offset flag to shift the reading of the image forward into the file. Right now only handles bytes (rounds down to the nearest multiple of 8 to get bytes).