class Exif::Thumbnail
APIs are subject to change.
Public Class Methods
new(ifd1, data)
click to toggle source
# File lib/exifparser/thumbnail.rb, line 30 def initialize(ifd1, data) @ifd1 = ifd1 @data = data end
Public Instance Methods
bits_per_sample()
click to toggle source
# File lib/exifparser/thumbnail.rb, line 52 def bits_per_sample search_tag('BitsPerSample') end
compression()
click to toggle source
# File lib/exifparser/thumbnail.rb, line 56 def compression search_tag('Compression') end
height()
click to toggle source
# File lib/exifparser/thumbnail.rb, line 47 def height search_tag('ImageLength') end
Also aliased as: length
photometric_interpretation()
click to toggle source
# File lib/exifparser/thumbnail.rb, line 60 def photometric_interpretation search_tag('PhotometricInterpretation') end
size()
click to toggle source
# File lib/exifparser/thumbnail.rb, line 35 def size @data.size end
strip_offsets()
click to toggle source
# File lib/exifparser/thumbnail.rb, line 64 def strip_offsets search_tag('StripOffsets') end
width()
click to toggle source
# File lib/exifparser/thumbnail.rb, line 43 def width search_tag('ImageWidth') end
write(dest)
click to toggle source
# File lib/exifparser/thumbnail.rb, line 39 def write(dest) dest << @data end
Private Instance Methods
search_tag(tag)
click to toggle source
# File lib/exifparser/thumbnail.rb, line 70 def search_tag(tag) @ifd1.find { |t| t.name == tag } end