class Exif::Tag::MakerNote::Tag0x0004

0x0004 - Tag0x0004

Public Instance Methods

processData() click to toggle source
# File lib/exifparser/makernote/canon.rb, line 275
def processData
  @formatted = []
  partition_data(@count) do |part|
    @formatted.push _formatData(part)
  end
end
value() click to toggle source
# File lib/exifparser/makernote/canon.rb, line 282
def value
  numTags = @formatted[0] / 2
  ret = {}

  return hash if numTags < 8
  # offset 7 : white balance
  ret['White balance'] =
  case @formatted[7]
  when 0
    "Auto"
  when 1
    "Sunny"
  when 2
    "Cloudy"
  when 3
    "Tungsten"
  when 4
    "Florescent"
  when 5
    "Flash"
  when 6
    "Custom"
  else
    "Unknown"
  end

  return ret if numTags < 10
  # offset 9: Sequence number (if in a continuous burst)
  ret['Sequence number'] = @formatted[9]

  return ret if numTags < 15
  # offset 14: Auto Focus point used
  ret['Auto Focus point used'] = @formatted[14]

  return ret if numTags < 16
  ret['Flash bias'] =
  case @formatted[15]
  when 0xffc0
    "-2 EV"
  when 0xffcc
    "-1.67 EV"
  when 0xffd0
    "-1.50 EV"
  when 0xffd4
    "-1.33 EV"
  when 0xffe0
    "-1 EV"
  when 0xffec
    "-0.67 EV"
  when 0xfff0
    "-0.50 EV"
  when 0xfff4
    "-0.33 EV"
  when 0x0000
    "0 EV"
  when 0x000c
    "0.33 EV"
  when 0x0010
    "0.50 EV"
  when 0x0014
    "0.67 EV"
  when 0x0020
    "1 EV"
  when 0x002c
    "1.33 EV"
  when 0x0030
    "1.50 EV"
  when 0x0034
    "1.67 EV"
  when 0x0040
    "2 EV"
  else
    "Unknown"
  end

  return ret if numTags < 20
  ret['Subject Distance'] = @formatted[19]

  ret
end