getCompressedImage static method

Image getCompressedImage(
  1. Uint8List _imageData
)

Implementation

static Library.Image getCompressedImage(Uint8List _imageData) {
  Library.Image image = Library.decodeImage(_imageData)!;
  if (image.width > 1920) {
    image = Library.copyResize(image, width: 1920);
  } else if (image.height > 1920) {
    image = Library.copyResize(image, height: 1920);
  }
  return image;
}