GitHub project page

Function lodepng::encode_file [-]  [+] [src]

pub fn encode_file<PixelType>(filepath: &Path, image: &[PixelType], w: usize, h: usize, colortype: ColorType, bitdepth: c_uint) -> Result<(), Error>

Converts raw pixel data into a PNG file on disk. Same as the other encode functions, but instead takes a file path as output.

NOTE: This overwrites existing files without warning!