resize method

  1. @override
FutureOr<String?> resize(
  1. Uint8List imageData,
  2. int width,
  3. int height
)
override

Implementation

@override
FutureOr<String?> resize(Uint8List imageData, int width, int height)
{
  // get decoder
  final decoder = findDecoderForData(imageData);
  if (decoder == null) return null;

  // decode image
  Image? image = decoder.decode(imageData);
  if (image != null)
  {
    image = copyResize(image, width: width, height: height);
    return _encode(image, decoder);
  }
  return null;
}