draw method

  1. @override
Future<Uint8List> draw(
  1. int width,
  2. int height,
  3. List<File> imageFiles
)
override

Draws an NFT.

Implementation

@override
Future<Uint8List> draw(int width, int height, List<File> imageFiles) async {
  final canvas = ig.Image(width: width, height: height);

  for (var imageFile in imageFiles) {
    Stopper.assertNotStopped();
    ig.compositeImage(canvas, (await ig.decodeImageFile(imageFile.path))!);
  }

  return ig.encodePng(canvas);
}