applyExifRotation function
Image
applyExifRotation(
- Image image,
- int exifRotation
)
Implementation
image_lib.Image applyExifRotation(image_lib.Image image, int exifRotation) {
if (exifRotation == 1) {
return image_lib.copyRotate(image, angle: 0);
} else if (exifRotation == 3) {
return image_lib.copyRotate(image, angle: 180);
} else if (exifRotation == 6) {
return image_lib.copyRotate(image, angle: 90);
} else if (exifRotation == 8) {
return image_lib.copyRotate(image, angle: 270);
}
return image;
}