iOS Native Image Cropping with image OUTSIDE of UIImagePickerController - ios

So, if I select an image with the UIImagePicker from the camera or camera roll, before I return to my app, it provides this great cropping feature.
I was hoping that there was a way to call this crop API directly without going through the camera or camera roll. If I have an existing image in an app (for instance a user profile photo) and the user wants to re-crop that image, can I open the crop tool?
I haven't seen anything about calling this crop tool outside of UIImagePicker.

Related

Detect Image with good contrast and well textured

I have a requirement where user click image and I have to check whether that clicked image will be compatible for AR Image trackable.
Example of good image as shown in WWDC
ARReferenceImage's validate() function will determine whether image is suitable for ARKit image tracking, when you can't upload image through xcode

iOS: saving UIImageView to Camera Roll

Even though this sounds super simple, I got stuck on this because of how my app works.
I have a UIImageView that loads an online image. On the app, I will have a button that gives the user a choice to export the image to Camera Roll.
Most solutions such as UIImageWriteToSavedPhotosAlbum don't work with UIImageView.
Should I first capture a UIImage from the UIImageView and then save to Camera Roll? How? Or can I save directly?
The UIImage is a representation of an image. UIImageView is a container for displaying that image in your app. What you need to save is the image, not the container.

Choosing Photo's from Camera Roll on every device

I have an app that chooses an image from the Camera Roll or Takes a photo using the Camera. The problem is that when I run the app on an iPad, if I select an image it doesn't display the full image later on.
Image you select : (Notice that the waterfall is pretty much entered.)
Image displayed : (The image is displayed wrong)
The problem is only on big devices like iPads. I'm saving the image using CoreData and then recovering it. How can I get it to display the full I'm age?
Niall
You need to set UIImageView contentMode to ScaleAspectFit

Adding rotation to UIImage in the ImageView- not the ImageView in iOS app

I am trying to add a user interactive rotation option to iOS app. I don't want to rotate the imageView but want to rotate the UIImage displayed on the imageView. I know how to do it on the imageView.
It is important to add the procedure through which image is provided to the imageView. I first take the image from Camera or Photo Library. Then, I crop the image using a crop tool created. I have followed the following code for the crop:
https://github.com/johnomarkid/BFCropInterface
After the crop I want to rotate the image like Photos Edit option in iPhone. Can anyone help in this regard?

How do you capture full screen camera photos on iOS?

On Snapchat, it allows you to take a full screen camera photo on iOS. The preview is full screen, and the image returned is full screen. There appears to be no cropping/stretching/etc... What you see is what you get.
Now I've looked all over the place, and I can't figure out how this is actually being done, seeing that the iPhone camera always returns an image with an aspect ratio of 4:3. Yes, you can use the camera view transform to have a full screen "preview", but the image returned is still 4:3 and needs to be cropped.
So my question is, how do you take a full screen camera photo on iOS without cropping? If your answer is that it can't be done, then how is Snapchat doing it (or appearing to do it)?
Snapchat isn't displaying everything the camera is picking up. By cropping a bit from the top/bottom or sides, they can create a 16:9 image from a 4:3 image. This is easy to verify.
Open up the snapchat and camera apps so it's easy to switch between them.
Place your phone on its side pointed at something with some marks for reference points.
Switch between the apps without moving the phone. There is content that you do not see on Snapchat.

Resources