removeRotation method

dynamic removeRotation(
  1. File inputImage
)

Implementation

removeRotation(File inputImage) async {
  final img.Image? capturedImage = img.decodeImage(await File(inputImage.path).readAsBytes());
  final img.Image orientedImage = img.bakeOrientation(capturedImage!);
  return await File(inputImage.path).writeAsBytes(img.encodeJpg(orientedImage));
}