Module: FormatParser::EXIFParser

Extended by:
EXIFParser
Included in:
CR2Parser, EXIFParser, JPEGParser, TIFFParser
Defined in:
lib/parsers/exif_parser.rb

Defined Under Namespace

Classes: EXIFResult, EXIFStack, IOExt

Constant Summary collapse

ORIENTATIONS =
{
  0 => :unknown, # Non-rotated
  1 => :top_left, # Non-rotated
  2 => :top_right, # Non-rotated
  3 => :bottom_right, # Non-rotated
  4 => :bottom_left, # Non-rotated
  5 => :left_top,
  6 => :right_top,
  7 => :right_bottom,
  8 => :left_bottom
}

Instance Method Summary collapse

Instance Method Details

#exif_from_tiff_io(constrained_io) ⇒ Object



170
171
172
173
174
175
# File 'lib/parsers/exif_parser.rb', line 170

def exif_from_tiff_io(constrained_io)
  Measurometer.instrument('format_parser.EXIFParser.exif_from_tiff_io') do
    raw_exif_data = EXIFR::TIFF.new(IOExt.new(constrained_io))
    raw_exif_data ? EXIFResult.new(raw_exif_data) : nil
  end
end