Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Convert UIImageOrientation to CGImageOrientation for use in Vision analysis.
- extension CGImagePropertyOrientation {
- init(_ uiImageOrientation: UIImage.Orientation) {
- switch uiImageOrientation {
- case .up: self = .up
- case .down: self = .down
- case .left: self = .left
- case .right: self = .right
- case .upMirrored: self = .upMirrored
- case .downMirrored: self = .downMirrored
- case .leftMirrored: self = .leftMirrored
- case .rightMirrored: self = .rightMirrored
- }
- }
- }
Add Comment
Please, Sign In to add comment