module ChunkyPNG::Canvas::PNGEncoding

def encode_png_image_with_interlacing(color_mode, bit_depth = 8, filtering = ChunkyPNG::FILTER_NONE)

Returns:
  • (String) - The PNG encoded canvas as string.

Parameters:
  • filtering (Integer) -- The filtering method to use.
  • bit_depth (Integer) -- The bit depth of the image.
  • color_mode (Integer) -- The color mode to use for encoding.
def encode_png_image_with_interlacing(color_mode, bit_depth = 8, filtering = ChunkyPNG::FILTER_NONE)
  stream = ChunkyPNG::Datastream.empty_bytearray
  0.upto(6) do |pass|
    subcanvas = self.class.adam7_extract_pass(pass, self)
    subcanvas.encoding_palette = encoding_palette
    subcanvas.encode_png_image_pass_to_stream(stream, color_mode, bit_depth, filtering)
  end
  stream
end