I'm using UIImagePickerController in my app to take pictures and I'm using my own controls, which means that the UIImagePickerController showsCameraControls property is set to NO and I have a UIButton inside the overlayView that shoots the pictures. Now, I noticed that the image that I save in the Photo Library is actually showing a bigger area than what shows in the preview view. Has anybody else had the same issue? Any solution to get the picture showing just what was in the preview?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
after getting the image object from picker resize the image then crop
I needed the same thing - in my case, to pick the dimension that fits once scaled, and then crop each end to fit the rest to the width. (I'm working in landscape, so might not have noticed any deficiencies in portrait mode.) Here's my code - it's part of a categeory on UIImage. Target size in my code is always set to the full screen size of the device.
By preview I assume, you are talking about image picker interface (and not the Default preview screen that appears after dismissing the image picker interface).
The transforms you apply to image picker interface (using cameraViewTransform) donot reflect on the image taken. For example, if you are trying to zoom (in and out) applying scale, you need to apply the same(transform) on the image obtained in order to keep the image in image picker interface and actual saved image in sync.
Also you will have to consider the image orientation into consideration while applying the transforms.