class Exif::Tag::Exif::UserComment

0x9286 - UserComment

Public Instance Methods

to_s() click to toggle source
# File lib/exifparser/tag.rb, line 1211
def to_s
  case @data[0..7]
  # ASCII
  when [0x41,0x53,0x43,0x49,0x49,0x0,0x0,0x0]
    @data[8..-1].pack("C*")
  # JIS
  when [0x4a,0x59,0x53,0x0,0x0,0x0,0x0,0x0]
    @data[8..-1].pack("C*")
  # Unicode
  when [0x55,0x4e,0x49,0x43,0x4f,0x44,0x45,0x0]
    @data[8..-1].pack("U*")
  when [0x0]*8
    @data[8..-1].pack("C*")
  else
    "unknown"
  end
end