pub fn write_tga<W: Write>(
writer: &mut W,
tga: &Tga,
) -> Result<(), TgaBinaryError>Expand description
Writes TGA data to a writer.
Output is always canonical: uncompressed true-color 32-bit BGRA with top-left origin and 8-bit alpha.
§Errors
TgaBinaryError::InvalidHeader when the image id is longer than the 255
bytes its length field holds, and TgaBinaryError::Io when the writer
fails, which can leave a partial file.
The input’s own compression and colour-map settings are not errors. Output is always the canonical form, so a run-length encoded image read in comes back out uncompressed.