lib/chunky_png/image.rb
# Encodes the image to a PNG datastream for saving to disk or writing to an IO stream.
#
# Besides encoding the canvas, it will also encode the metadata fields to text chunks.
#
# @param [Hash] constraints The constraints to use when encoding the canvas.
# @return [ChunkyPNG::Datastream] The datastream that contains this image.
# @see ChunkyPNG::Canvas::PNGEncoding#to_datastream
# @see #metadata_chunks
Encodes the image to a PNG datastream for saving to disk or writing to an IO stream.
Besides encoding the canvas, it will also encode the metadata fields to text chunks.
Encodes the image to a PNG datastream for saving to disk or writing to an IO stream . Besides encoding the canvas it will also encode the metadata fields to text chunks .
def to_datastream(constraints = {})
      ds = super(constraints)
      ds.other_chunks += metadata_chunks
      ds
    end
def to_datastream ( constraints = { } ) ds = super ( constraints ) ds . other_chunks += metadata_chunks ds end
Encodes the image to a PNG datastream for saving to disk or writing to an IO stream.
Encodes the image to a PNG datastream for saving to disk or writing to an IO stream .
The datastream that contains this image.
The datastream that contains this image .
ChunkyPNG::Datastream
constraints
<not_specific>
<not_specific>
constraints The constraints to use when encoding the canvas.
constraints The constraints to use when encoding the canvas .
see
None
see
None