imageorient | Go image decoding with respect to the EXIF orientation tag | Computer Vision library
kandi X-RAY | imageorient Summary
kandi X-RAY | imageorient Summary
Package imageorient provides image decoding functions similar to standard library's image.Decode and image.DecodeConfig with the addition that they also handle the EXIF orientation tag (if present).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- readOrientation reads the orientation from r .
- DecodeConfig returns the width and width of the image .
- Decode decodes an image from an io . Reader .
- fixOrientation fixes the image with the given orientation .
- getOrientation returns the orientation of the given reader .
imageorient Key Features
imageorient Examples and Code Snippets
Community Discussions
Trending Discussions on imageorient
QUESTION
Background
I have an app that uses AVFoundation in order to have a custom camera. This happens in the OCRViewController
. When I take a picture I send the captured picture to a different view ImagePreviewViewController
.
I am using Xcode 10.2.1 (10E1001)
with Swift 5
The Goal
What I would like to achieve is to lock the orientation of the ImagePreviewViewController
to the original orientation of the image. I already know how to get the orientation of the image but I am not able to lock the orientation of the view.
I get the image rotation as such: let imageOri = capturedImage?.imageOrientation
What did I try?
I tried the accepted answers at and several other sources:
How to lock orientation just for one view controller?
How to lock orientation of one view controller to portrait mode only in Swift
Reading the documentation at https://developer.apple.com/documentation/uikit/uiviewcontroller#//apple_ref/occ/instm/UIViewController/supportedInterfaceOrientations under Handling View Rotation the following is stated:
I also tried the many suggested solutions while writing this query, however, the majority appears to use the following approach (or a variation of it), and it does not work for me.
...ANSWER
Answered 2019-Jul-26 at 11:59To restrict the rotation of one screen, use this.
In AppDelegate
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install imageorient
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page