[][src]Function swf_parser::parsers::image::get_png_image_dimensions

pub fn get_png_image_dimensions(input: &[u8]) -> Result<ImageDimensions, ()>

Reads image properties from a byte stream with the content of a PNG image.

It trusts that the image has a valid PNG signature (first 8 bytes).

@see https://www.w3.org/TR/PNG/#5Chunk-layout @see https://www.w3.org/TR/PNG/#5ChunkOrdering @see https://www.w3.org/TR/PNG/#11IHDR