encodeTgaFile function

Future<bool> encodeTgaFile(
  1. String path,
  2. Image image
)

Encode an image to a TGA file at the given path.

Implementation

Future<bool> encodeTgaFile(String path, Image image) async {
  if (!supportsFileAccess()) {
    return false;
  }
  final bytes = TgaEncoder().encode(image);
  return writeFile(path, bytes);
}