Module: FileData::TagEnumerator
- Included in:
- Ifd, OrdinalIfd
- Defined in:
- lib/file_data/formats/exif/ifd.rb
Overview
Contains the ability to enumerate through the exif tags in an ifd
Constant Summary collapse
- TAG_RECORD_SIZE =
12
Instance Method Summary collapse
Instance Method Details
#read_num_tags ⇒ Object
16 17 18 |
# File 'lib/file_data/formats/exif/ifd.rb', line 16 def stream.read_value(2) end |
#tags_enum ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/file_data/formats/exif/ifd.rb', line 6 def Enumerator.new do |e| .times do tag_start_pos = stream.pos e.yield stream.read_value(2) stream.seek(tag_start_pos + TAG_RECORD_SIZE) end end.lazy end |
#tags_size(num_tags) ⇒ Object
20 21 22 |
# File 'lib/file_data/formats/exif/ifd.rb', line 20 def () * TAG_RECORD_SIZE end |