Module: Exif::Utils::Decode::Intel
- Defined in:
- lib/exifparser/utils.rb
Instance Method Summary collapse
- #byte_order ⇒ Object
- #decode_slong(str) ⇒ Object
- #decode_sshort(str) ⇒ Object
- #decode_ubytes(str) ⇒ Object
- #decode_ulong(str) ⇒ Object
- #decode_ushort(str) ⇒ Object
- #parseTagID(str) ⇒ Object
Instance Method Details
#byte_order ⇒ Object
54 55 56 |
# File 'lib/exifparser/utils.rb', line 54 def byte_order :intel end |
#decode_slong(str) ⇒ Object
74 75 76 |
# File 'lib/exifparser/utils.rb', line 74 def decode_slong(str) str[0,4].unpack('l').first end |
#decode_sshort(str) ⇒ Object
70 71 72 |
# File 'lib/exifparser/utils.rb', line 70 def decode_sshort(str) str[0,2].unpack('s').first end |
#decode_ubytes(str) ⇒ Object
58 59 60 |
# File 'lib/exifparser/utils.rb', line 58 def decode_ubytes(str) str.unpack('C*') end |
#decode_ulong(str) ⇒ Object
66 67 68 |
# File 'lib/exifparser/utils.rb', line 66 def decode_ulong(str) str[0,4].unpack('V').first end |
#decode_ushort(str) ⇒ Object
62 63 64 |
# File 'lib/exifparser/utils.rb', line 62 def decode_ushort(str) str[0,2].unpack('v').first end |
#parseTagID(str) ⇒ Object
78 79 80 |
# File 'lib/exifparser/utils.rb', line 78 def parseTagID(str) "0x" + str.unpack("C*").reverse.collect{ |e| sprintf("%02x", e) }.join("") end |