cropSync static method

Uint8List cropSync({
  1. required Uint8List bytes,
  2. required Rect cropRectNormalized,
  3. int rotation = 0,
  4. bool flipHorizontal = false,
  5. bool flipVertical = false,
  6. CropShape shape = CropShape.rectangle,
  7. OutputFormat format = OutputFormat.preserve,
  8. int quality = 90,
})

Synchronous version of crop for pure-Dart environments or unit tests.

Implementation

static Uint8List cropSync({
  required Uint8List bytes,
  required Rect cropRectNormalized,
  int rotation = 0,
  bool flipHorizontal = false,
  bool flipVertical = false,
  CropShape shape = CropShape.rectangle,
  OutputFormat format = OutputFormat.preserve,
  int quality = 90,
}) {
  return _cropTask(
    _CropTaskParams(
      bytes: bytes,
      cropRectNormalized: cropRectNormalized,
      rotation: rotation,
      flipHorizontal: flipHorizontal,
      flipVertical: flipVertical,
      shape: shape,
      format: format,
      quality: quality,
    ),
  );
}