Class: ChunkyPNG::Chunk::End
Overview
The End (IEND) chunk indicates the last chunk of a PNG stream. It does not contain any data.
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.read(type, content) ⇒ ChunkyPNG::Chunk::End
Reads the END chunk.
Instance Method Summary collapse
-
#content ⇒ ""
Returns an empty string, because this chunk should always be empty.
-
#initialize ⇒ End
constructor
A new instance of End.
Methods inherited from Base
Constructor Details
#initialize ⇒ End
Returns a new instance of End.
151 152 153 |
# File 'lib/chunky_png/chunk.rb', line 151 def initialize super('IEND') end |
Class Method Details
.read(type, content) ⇒ ChunkyPNG::Chunk::End
Reads the END chunk. It will check if the content is empty.
160 161 162 163 |
# File 'lib/chunky_png/chunk.rb', line 160 def self.read(type, content) raise ExpectationFailed, 'The IEND chunk should be empty!' if content.bytesize > 0 self.new end |
Instance Method Details
#content ⇒ ""
Returns an empty string, because this chunk should always be empty.
167 168 169 |
# File 'lib/chunky_png/chunk.rb', line 167 def content ChunkyPNG::Datastream.empty_bytearray end |