pub(crate) fn encode_file<PixelType: Copy + Pixel, P: AsRef<Path>>(
    filepath: P,
    raster: &Raster<PixelType>,
    colortype: ColorType,
    bitdepth: u32,
) -> Result<(), Error> {
    let encoded = encode_memory(raster, colortype, bitdepth)?;
    save_file(filepath, encoded.as_ref())
}
/// 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!
Converts raw pixel data into a PNG file on disk.
Same as the other encode functions, but instead takes a file path as output.

This overwrites existing files without warning!
Converts raw pixel data into a PNG file on disk . Same as the other encode functions but instead takes a file path as output . This overwrites existing files without warning!
pub(crate) fn encode_file<PixelType: Copy + Pixel, P: AsRef<Path>>(
    filepath: P,
    raster: &Raster<PixelType>,
    colortype: ColorType,
    bitdepth: u32,
) -> Result<(), Error> {
    let encoded = encode_memory(raster, colortype, bitdepth)?;
    save_file(filepath, encoded.as_ref())
}
pub ( crate ) fn encode_file < PixelType : Copy + Pixel , P : AsRef < Path > > ( filepath : P , raster : & Raster < PixelType > , colortype : ColorType , bitdepth : u32 , ) -> Result < ( ) , Error > { let encoded = encode_memory ( raster , colortype , bitdepth ) ? ; save_file ( filepath , encoded . as_ref ( ) ) }
Converts raw pixel data into a PNG file on disk.
Converts raw pixel data into a PNG file on disk .
filepath
P
raster
&Raster<PixelType>
colortype
ColorType
bitdepth
u32