Class: FastImageParsing::Tiff

Inherits:
ImageBase show all
Defined in:
lib/fastimage/fastimage_parsing/tiff.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from ImageBase

#animated?

Constructor Details

#initialize(stream) ⇒ Tiff

Returns a new instance of Tiff.



3
4
5
# File 'lib/fastimage/fastimage_parsing/tiff.rb', line 3

def initialize(stream)
  @stream = stream
end

Instance Method Details

#dimensionsObject



7
8
9
10
11
12
13
14
# File 'lib/fastimage/fastimage_parsing/tiff.rb', line 7

def dimensions
  exif = Exif.new(@stream)
  if exif.rotated?
    [exif.height, exif.width, exif.orientation]
  else
    [exif.width, exif.height, exif.orientation]
  end
end