flip method

  1. @override
FutureOr<String?> flip(
  1. Uint8List imageData,
  2. String axis
)
override

Implementation

@override
FutureOr<String?> flip(Uint8List imageData, String axis)
{
  // get decoder
  final decoder = findDecoderForData(imageData);
  if (decoder == null) return null;

  // decode image
  Image? image = decoder.decode(imageData);
  if (image != null)
  {
    image = (axis == "vertical") ? flipVertical(image) : flipHorizontal(image);
    return _encode(image, decoder);
  }
  return null;
}