Class: Exif::Tag::Exif::SubjectArea

Inherits:
Base
  • Object
show all
Defined in:
lib/exifparser/tag.rb

Overview

0x9214 - SubjectArea

Instance Attribute Summary

Attributes inherited from Base

#IFD, #count, #data, #dataPos, #pos, #tagID

Instance Method Summary collapse

Methods inherited from Base

#formatExposureTime, #formatFNumber, #formatFocalLength, #formatLatLon, #initialize, #inspect, #name, #value

Constructor Details

This class inherits a constructor from Exif::Tag::Base

Instance Method Details

#processDataObject



1165
1166
1167
1168
1169
1170
# File 'lib/exifparser/tag.rb', line 1165

def processData
  @formatted = []
  partition_data(@count) do |data|
    @formatted.push _formatData(data)
  end
end

#to_sObject



1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
# File 'lib/exifparser/tag.rb', line 1172

def to_s
  case @count
  when 2
    "Coordinate - [%d, %d]"%[*@formatted]
  when 3
    "Circle - Center: [%d, %d], Diameter: %d"%[*@formatted]
  when 4
    "Rectanglar - Center: [%d, %d], Width: %d, Height: %d"%[*@formatted]
  else
    'Unknown'
  end
end