fromValue static method

CGImagePropertyOrientation fromValue(
  1. int value
)

Implementation

static CGImagePropertyOrientation fromValue(int value) => switch (value) {
  1 => kCGImagePropertyOrientationUp,
  2 => kCGImagePropertyOrientationUpMirrored,
  3 => kCGImagePropertyOrientationDown,
  4 => kCGImagePropertyOrientationDownMirrored,
  5 => kCGImagePropertyOrientationLeftMirrored,
  6 => kCGImagePropertyOrientationRight,
  7 => kCGImagePropertyOrientationRightMirrored,
  8 => kCGImagePropertyOrientationLeft,
  _ => throw ArgumentError('Unknown value for CGImagePropertyOrientation: $value'),
};