Function rerun::external::image::write_buffer_with_format
pub fn write_buffer_with_format<W>(
buffered_writer: &mut W,
buf: &[u8],
width: u32,
height: u32,
color: impl Into<ExtendedColorType>,
format: ImageFormat
) -> Result<(), ImageError>
Expand description
Writes the supplied buffer to a writer in the specified format.
The buffer is assumed to have the correct format according to the specified color type. This will lead to corrupted writers if the buffer contains malformed data.
Assumes the writer is buffered. In most cases, you should wrap your writer in a BufWriter
for
best performance.