Method: FileData::ExifStream#read_header
- Defined in:
- lib/file_data/formats/exif/exif_stream.rb
#read_header ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/file_data/formats/exif/exif_stream.rb', line 33 def read_header @is_little_endian = case @stream.each_byte.take(2) when INTEL_BYTES then true when MOTOROLLA_BYTES then false else raise 'the byte order bytes did not match any expected value' end raise 'the tiff constant 42 is missing' unless read_value(2) == 42 end |