Class: FileData::ExifJpeg

Inherits:
Object
  • Object
show all
Defined in:
lib/file_data/formats/exif/exif_jpeg.rb

Overview

Retrieves an ExifStream from a jpeg stream

Constant Summary collapse

APP1_BYTES =
[255, 225].freeze
EXIF_ID =
"Exif\0\0".bytes.to_a.freeze

Instance Method Summary collapse

Constructor Details

#initialize(stream) ⇒ ExifJpeg

Returns a new instance of ExifJpeg.



10
11
12
# File 'lib/file_data/formats/exif/exif_jpeg.rb', line 10

def initialize(stream)
  @stream = stream
end

Instance Method Details

#exifObject



14
15
16
# File 'lib/file_data/formats/exif/exif_jpeg.rb', line 14

def exif
  ExifStream.new(@stream) if seek_exif
end