[][src]Module pconvert_rust::utils

PNG decode/encode and read/write functions, external crate type conversions and other utility functions.

Functions

decode_png

Decodes and returns a PNG.

encode_png

Encodes a PNG and writes it to a buffer.

image_compression_from

Converts a String to a image::codecs::png::CompressionType. This can not be done by implementing the trait From<String> for CompressionType due to Rust's. orphan rule.

image_filter_from

Converts a String to a image::codecs::png::FilterType. This can not be done by implementing the trait From<String> for FilterType due to Rust's orphan rule.

max

Maximum of two values that implement the PartialOrd trait.

min

Minimum of two values that implement the PartialOrd trait.

read_png_from_file

Reads a PNG from the local file system.

write_png_parallel

[SUPPORTED IN WASM] WASM stub; single-threaded write PNG to the local file system.

write_png_to_file

Writes a PNG to the local file system using the provided compression and filter definitions.

write_png_to_file_d

Writes a PNG to the local file system using the default compression and filter settings.