xCreateThumbnails_FromImage method

Uint8List xCreateThumbnails_FromImage(
  1. Uint8List image_payload, {
  2. int width = 80,
  3. int height = 100,
})

Implementation

Uint8List xCreateThumbnails_FromImage(Uint8List image_payload, {int width = 80, int height = 100}) {
  final imgOri = img.decodeJpg(image_payload)!;
  var resizedImg = img.copyResize(imgOri, width: width, height: height);
  final pngBytes = img.encodePng(resizedImg);
  return pngBytes;
}