Class: FileData::ExifReader
- Inherits:
-
Object
- Object
- FileData::ExifReader
- Defined in:
- lib/file_data/formats/exif/exif_reader.rb
Overview
Returns the exif data from a jpeg file
Instance Method Summary collapse
- #all_data ⇒ Object
- #image_data_only ⇒ Object
-
#initialize(exif_stream) ⇒ ExifReader
constructor
A new instance of ExifReader.
- #only_image_tag(tag_id) ⇒ Object
- #only_thumbnail_tag(tag_id) ⇒ Object
- #tags(*ifds_to_include) ⇒ Object
- #thumbnail_data_only ⇒ Object
Constructor Details
#initialize(exif_stream) ⇒ ExifReader
Returns a new instance of ExifReader.
9 10 11 |
# File 'lib/file_data/formats/exif/exif_reader.rb', line 9 def initialize(exif_stream) @exif_stream = exif_stream end |
Instance Method Details
#all_data ⇒ Object
21 22 23 |
# File 'lib/file_data/formats/exif/exif_reader.rb', line 21 def all_data (0, 1) end |
#image_data_only ⇒ Object
13 14 15 |
# File 'lib/file_data/formats/exif/exif_reader.rb', line 13 def image_data_only (0).image end |
#only_image_tag(tag_id) ⇒ Object
25 26 27 |
# File 'lib/file_data/formats/exif/exif_reader.rb', line 25 def only_image_tag(tag_id) exif_tag_internal(0, tag_id) end |
#only_thumbnail_tag(tag_id) ⇒ Object
29 30 31 |
# File 'lib/file_data/formats/exif/exif_reader.rb', line 29 def only_thumbnail_tag(tag_id) exif_tag_internal(1, tag_id) end |
#tags(*ifds_to_include) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/file_data/formats/exif/exif_reader.rb', line 33 def (*ifds_to_include) return [] if @exif_stream.nil? @exif_stream.read_header ExifTagReader.new(@exif_stream, *ifds_to_include). end |
#thumbnail_data_only ⇒ Object
17 18 19 |
# File 'lib/file_data/formats/exif/exif_reader.rb', line 17 def thumbnail_data_only (1).thumbnail end |