Adding "allowsEditing" to custom UIImagePickerController - ios

I integrated a so called OLFacebookImagePicker into my application.
From Here.
For my app I need images to be cropped to squares like the allowsEditing
of the native UIImagePickerController does.
My Question is:
Is it possible to integrate this feature in a custom PickerController?
I've got the idea to MAYBE get the images from the OLFacebookImagePicker
into the app and manipulate them afterwards. But I want to give the users the chance to customize their pictures by themselves.

Related

iOS Image Viewer like Photo app

I am developing an app that has an internal gallery with some images.
What I want to achieve is exactly a result that behaves and looks like the Apple Photo app image viewer.
With a collection view I implemented the gallery images with thumbnails and now I would like to show the image on fullscreen on press.
The image viewer should have exactly the Apple's Photo behavior:
Full screen on single tap,
Delete, Share button etc...
Pinch to zoom, double tap zoom...
My question is. Is that really possible that such a common feature is not already given by iOS? Is there maybe a view controller already build in that we can use but I am not aware of?
I know there are some libraries around that make such thing, but I'm wondering if there's already something given.

How do I invoke iOS photo editing extension?

Let's say I'm writing a word-processing application. Users can embed images using the app. Now since the application is not a photo editor, naturally it would delegate photo editing of embedded images to other applications.
The question is, how to do that? How to invoke photo editing extensions in an iOS app?
Theoretically it should be as simple as passing an image, invoke the extension, and then get another image back as the "edited" image. However the SDK documentation doesn't seem to provide any hint on how to do this.
Looks like the SDK doc actually says it doesn't provide a UI per se:
When using built-in editing controls, the image picker controller enforces certain options. For still images, the picker enforces a square cropping as well as a maximum pixel dimension. For movies, the picker enforces a maximum movie length and resolution. If you want to let the user edit full-size media, or specify custom cropping, you must provide your own editing UI."
From:
https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/PickinganItemfromthePhotoLibrary.html
I'm looking at the Adobe Creative SDK Image Editor, which seems to provide a UI. Might show some of their branding in the photo editor, however. Hope to follow up...

iOS8 - Crop and Straighten image as built in photos tool

In my app, i want users to click a photo, then i want to allow them to edit it for crop/rotate/straighten. Can i use built-in photos app for that? or is there any open-source/api to have similar view controller.
I know it's a possible duplicate of Is there a view controller for image crop and rotate works like iOS 8 photo.app? but i found no answer here as well.Please let me know if it's possible?
Unfortunately, no.
UIImagePickerViewController allowEditing property, when set to YES, provides you a very simple cropping UI, but it doesn't support advanced rotation as iOS Photo app.
So you'll have to make it yourself.
The github projects in the question you linked might be a good starting point for that. (here's another one)
Good luck !
I wrote one in Swift, you can continue to develop based on this: QCropper

How to automatically adjust a photo (ie. brighten, contrast) on iOS?

My iOS app (objective-C) handles photos. I'd like it to be able offer the user a way to automatically "adjust" an image, like how iOS itself does in the Photos app (little magic-wand icon), or how facebook does it. This basically means auto-brightness and auto-contrast adjustment.
So far i've found "filtrr" (more concerned with adding color it seems), and OpenCV (uhh, feels like using a nuclear missile to swat a fly with). Any other hints? Is there some library or a way of even doing this natively in iOS?
thx!
Look into Core Image for info on filters and how to apply them. Apple's programming guide is a good place to start.
Once you're up and running with Core Image, see the autoAdjustmentFilters method for getting a set of filters that's preconfigured for "one touch enhance" kinds of usage.

ios stock edit screen

When you open a picture in your photo album and you select a picture there is an edit button top right which opens up auto enhance/red eye and crop features. Is there a way to get this view/screen in iOS SDK?
If you're using UIImagePickerController to allow the user to select images from their library you can set its allowsEditing property to yes. I think this only allows the cropping feature though, not the red-eye. If you want a red-eye feature you'd have to do it yourself, consider Core Image auto adjustment.
As #Wain stated, with UIImagePickerController you can't do much with the allowsEditing set to YES other than crop/resize.
See Core Image Programming Guide for more information on editing photos.
Additionally, there are third-party libraries and SDK's that'll allow you to edit the image more thoroughly.
AviarySDK is easy to set up and use in your apps. You can download their sample app for free in the app store if you want to see what it can do. Check it out here: http://aviary.com/

Resources