Class: FastImageParsing::Avif

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

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from ImageBase

#initialize

Constructor Details

This class inherits a constructor from FastImageParsing::ImageBase

Instance Method Details

#animated?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/fastimage/fastimage_parsing/avif.rb', line 8

def animated?
  @stream.peek(12)[4..-1] == "ftypavis"
end

#dimensionsObject



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

def dimensions
  bmff = IsoBmff.new(@stream)
  [bmff.width, bmff.height]
end