How do I invoke iOS photo editing extension? - ios

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...

Related

Prevent manual screenshot in IOS Objective-C

On iOS, my requirement is disallow user to take manual screenshot from my application, either disallow or blur the captured screenshot. How?
The only solution is to simulate the iOS controls you have in your View using DRM'ed videos.
For each widget you need to create a video subclass that renders the widget, and apply DRM to the video.
You can try to do it yourself, or use a commercial solution such as the following:
https://screenshieldkit.com
It is possible but I don't recommend it because of the room for error. It was easier to do in the past, in iOS13 you will have to do it like this:
You will have to ask for the user's permission to read and edit their photo library, then you have a listener which is checking the number of photos in their library while they are using your app, if that number changes, they have just taken a screenshot (unless you allow other things in your app like tap and hold to save image, etc). When this happens, read said photo and apply a blur, then delete the photo from their library and save the blurred photos.
Warning: There are times where a user may get a photo while using your app that is not a screenshot (e.g. they received an airdrop) and you will now be tampering with their photos, which is very bad. To prevent this you may need to use key value pixel encoding on your screen at all times, for example the first 3 pixels of the screen are 3 very specific RGB values, that way if a new photo is detected and the first 3 pixels are those exact RGB values you know it's a screenshot of your app and not just another photo that was somehow saved while the user was using the app.
There isn't any regular solution to your problem!
You can do some tricks such as if you force the user to have their finger on the screen for the image to show then I don't think they can create screenshots. Because as soon as you press the home+lock keys to actually take the screenshot, the screen seems to behave as if there are no fingers touching it.
BUT what if the user takes a screenshot by AssistiveTouch?!
OR what do you want to do if user records screen and taking screenshot from the video?
I think it's better to change your strategy for example notify the owner of picture for taking screen shot by another one (like SnappChat)!

Adding "allowsEditing" to custom UIImagePickerController

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.

iOS How to create a custom image picker/browser

I have been looking around and haven't found a good answer for this.
Instagram uses an image browser/picker like . As you can see above the images from the photo gallery are displayed in a grid below and you can directly choose image from there instead of using the default image picker layout.
The Groupme app also does something similar..
Where images are displayed in a horizontal scrollable list and you can just choose from this.
I have been reading up on the image picker and the documentation says that subclassing is not support.
So my question is:
How do you create something like this?
If this is just a custom view that loads the images stored on the device. How do I access those images?
I just need a starting point and what to specifically look for (custom browser/image picker etc).
Thanks in advance.
You use the ALAssetsLibrary APIs, docs here.

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/

iPad Photo Gallery Framework

I am looking for some framework that allows me to create a Photo Gallery that allows the user to swipe through pictures, and then select one and it takes them to a specific view based on that image. I seen this idea in another App, and didnt know if this was an open source framework, or if there is anything similar.
I wrote a library that should be able to handle this:
https://github.com/nicklockwood/iCarousel
Check out the "custom" or "time machine" carousels in the example app for something similar to what you've shown.
Here's a screenshot. Don't worry that it's not exactly the same as your picture; the angle, panel size, etc. can all be configured.

Resources