Class: FastImage::Heic

Inherits:
Object
  • Object
show all
Defined in:
lib/fastimage.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(stream) ⇒ Heic

Returns a new instance of Heic.



588
589
590
# File 'lib/fastimage.rb', line 588

def initialize(stream)
  @stream = stream
end

Instance Method Details

#width_and_heightObject



592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
# File 'lib/fastimage.rb', line 592

def width_and_height
  @rotation = 0
  @max_size = nil
  @primary_box = nil
  @ipma_boxes = []
  @ispe_boxes = []
  @final_size = nil

  catch :finish do
    read_boxes!
  end

  if [90, 270].include?(@rotation)
    @final_size.reverse
  else
    @final_size
  end
end