TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Commercial |
ReleasedLast Release | Oct 2024 |
Maintained by Alexander Schiewe, Leon Dudlik, Sascha Schwabbauer, Tim Weisseisen.
Our SDK provides tools for adding photo editing capabilities to your iOS application with a big variety of filters that can be previewed in realtime. Unlike other apps that allow a live preview of filters, the Photo Editor SDK even provides a live preview when using high-resolution images. We do not have any resolution limits, the framework is written in Swift and allows for easy customization. Additionally we support adding stickers and text in a non-destructive manner, which means that you can change the position, size, scale and order at any given time, even after applying other effects or cropping the photo.
Please see LICENSE for licensing details.
PhotoEditorSDK is available via CocoaPods. If you're new to CocoaPods, this Getting Started Guide will help you. CocoaPods is the preferred and simplest way to use the PhotoEditorSDK.
Important: Please make sure that you have a CocoaPods version >= 0.39.0 installed. You can check your version of CocoaPods with pod --version
.
Here's what you have to add to your Podfile
:
use_frameworks!
pod 'imglyKit', '~> 6.5'
Then run pod install
.
If you prefer not to use either of the aforementioned dependency manager, you can integrate PhotoEditorSDK into your project manually via a dynamic framework.
Just drag imglyKit.framework
into the Embedded Binaries
section of your target:
Our SDK provides two main view controllers. One to work with the camera, the other to
edit an image. In the following section we will describe how these are set up and how to embed them within an UINavigationController
.
The CameraViewController
class is responsible for displaying an interface to interact with the camera. It provides user interface elements among others to enable the flash, toggle the camera and choose a filter. All you have to do is the following:
let cameraViewController = CameraViewController()
present(cameraViewController, animated: true, completion: nil)
The CameraViewController
has a completionBlock
property. When it is set to nil
, the taken photo is passed to the PhotoEditViewController
, which is then presented modally.
The PhotoEditViewController
class is responsible for presenting and rendering an image. It is designed to work together with a ToolbarController
, which is responsible to presenting and dismissing the various tool controllers.
To present an PhotoEditViewController
just add these few lines:
let sampleImage = UIImage(named: "sample_image")
let photoEditViewController = PhotoEditViewController(photo: sampleImage!)
photoEditViewController.delegate = self
let toolbarController = ToolbarController()
toolbarController.push(photoEditViewController, animated: false)
present(toolbarController, animated: true, completion: nil)
The delegate of the PhotoEditViewController
can be used to be notified when the user cancels the edit, the edit fails, or the edit is done. In the last case the func photoEditViewController(_ photoEditViewController: PhotoEditViewController, didSave image: UIImage, and data: Data)
method is called.
The controllers provided with the SDK can be embedded in an UINavigationController
. The following code demonstrates how.
let sampleImage = UIImage(named: "sample_image")
let photoEditViewController = PhotoEditViewController(photo: sampleImage!)
photoEditViewController.delegate = self
let toolbarController = ToolbarController()
toolbarController.push(photoEditViewController, animated: false)
let navigationController = UINavigationController(rootViewController: toolbarController)
navigationController.navigationBar.barStyle = .black
navigationController.navigationBar.isTranslucent = false
present(navigationController, animated: true, completion: nil)
To try these examples, and find out about more options please take a look at the sample project provided here.
For a more detailed documentation, please see our full documentation
9elements GmbH, @PhotoEditorSDK, https://www.photoeditorsdk.com