An instagram-like image editor that can apply preset filters passed to it and customized editings to a binded image.

Overview

CZImageEditor

CZImageEditor is an instagram-like image editor with clean and intuitive UI. It is pure swift and can apply preset filters and customized editings to a binded image. Customized editings include rotation, zooming, cropping, brightness, contrast, saturation, warmth, and sharpen.

Language: Swift 5 Platfor

Features

Preset Filters

You can pass your own preset filters to the CIImageEditor. They should conform to CIFilter. By default, four built-in filters will be used: Normal (original), Crystal, Vivid, and Air.

Adjust Image

User can adjust the image by rotating, zooming, and cropping. The edge of the image will be aligned automatically to make sure the cropping frame stays in the range of image.

Custom Editings

User can adjust the image's brightness, contrast, saturation, warmth, and sharpen in the edit pannel.

Different Shape of Cropping Frame

You can preset the cropping frame to the editor. There are five options: image's original shape (default), 4 : 3, 1 : 1, 3 : 4, circle.

Keep Track of Changes

All changes and the orginal image will be saved separately. So these changes won't lose when the editor is dismissed. When user reopen the editor again, they have option to revert all changes or apply new changes on the latest version. See Usage section for more details.

Localization

You have the option to apply localization string to this editor. You can set a localization prefix string to all shown text in editor's UI.

Callback clousure

You can add an optional callback clousure which will be excuted when user confirmed the changes made to the image.

Preview

Preset Filters Rotation and Crop Custom Editing
preview1 preview2 preview3

Usage

Parameters

Only two required parameters are image and parameters. All other parameters have default values.

  • image: A binding to the image about to be edited.
  • parameters: A binding to a group of parameters that contains the original image and all possible changes have been made to the image.
  • frame: What frame shape you want to use. By default, it is the same shape of original iamge. You can also choose in 4 by 3, square, 3 by 4, and circle.
  • filters: The preset filters that can be chosen by user to apply to the image. These filters should conform to CIFilter.
  • filterNameFont: Text font applies to the preset filter name
  • thumbnailMaxSize: The maximium length of the thumbnail of the image used during editing.
  • localizationPrefix: A prefix string that attached to all text shown on the screen.
  • actionWhenConfirm: An optional clousure that excutes when user confirm the changes to the image.

Keep Track of Changes

This editor uses a struct called ImageEditorParameters to keep track of the changes made to the image, so users get chance to revert the changes them made. You should create and keep this struct along with the CZImageEditor when you use this editor.

Example

The following example shows a typcial scenario of how this editor should be used in your code.

   struct ContentView: View {
       @State private var image = UIImage(named: "testImage")!
       @State private var showImageEditor = false
       @State private var savedImageEditorParameters = ImageEditorParameters()
       @State private var yourOwnFilters: [CIFilter] = [...] // your own preset filters (optional)

       var body: some View {
           VStack {
               Image(uiImage: image)
                   .resizable()
                   .scaledToFit()
                   .onTapGesture {
                       showImageEditor = true
                   }
           }
           .frame(width: 200, height: 300)
           .fullScreenCover(isPresented: $showImageEditor) {
               CZImageEditor(image: $image, parameters: $savedImageEditorParameters, filters: yourOwnFilters)
           }
       }
   }

Installation

Add a package by selecting FileAdd Packages… in Xcode’s menu bar.

Search for the CZImageEditor using the repo's URL:

https://github.com/KaiyiZhao/CZImageEditor.git
You might also like...
FMPhotoPicker is a modern, simple and zero-dependency photo picker with an elegant and customizable image editor
FMPhotoPicker is a modern, simple and zero-dependency photo picker with an elegant and customizable image editor

FMPhotoPicker is a modern, simple and zero-dependency photo picker with an elegant and customizable image editor Quick demo Batch select/deselect Smoo

Image Editor iOS App - CLEAN Architecture + MVP Pattern
Image Editor iOS App - CLEAN Architecture + MVP Pattern

Image Editor iOS Application - Built using UIKit, CoreData, CoreImage, and URLSession Frameworks with CLEAN Architecture and MVP UI design pattern.

FlaneurImagePicker is an iOS image picker that allows users to pick images from different sources (ex: user's library, user's camera, Instagram...).                            It's highly customizable.
FlaneurImagePicker is an iOS image picker that allows users to pick images from different sources (ex: user's library, user's camera, Instagram...). It's highly customizable.

FlaneurImagePicker is a highly customizable iOS image picker that allows users to pick images from different sources (ex: device's library, device's c

AYImageKit is a Swift Library for Async Image Downloading, Show Name's Initials and Can View image in Separate Screen.
AYImageKit is a Swift Library for Async Image Downloading, Show Name's Initials and Can View image in Separate Screen.

AYImageKit AYImageKit is a Swift Library for Async Image Downloading. Features Async Image Downloading. Can Show Text Initials. Can have Custom Styles

PhotoEditor SDK: A fully customizable photo editor for your app.

About PhotoEditor SDK for iOS Our SDK provides tools for adding photo editing capabilities to your iOS application with a big variety of filters that

Xcode plugin to open the GitHub page of the commit of the currently selected line in the editor window.
Xcode plugin to open the GitHub page of the commit of the currently selected line in the editor window.

Show in GitHub / BitBucket Xcode plugin to open a related Github or BitBucket page directly from the Xcode editor code window. Installs easily through

NavigationCoordinator acts as a coordinator for NavigationView in SwiftUI. You can use pushView, popView, popToView, popToRootView as you can in traditional UIKit

NavigationCoordinator NavigationCoordinator acts as a coordinator for NavigationView. You can use pushView, popView, popToView, popToRootView in Swift

A custom ImageView that is used to cover the surface of other view like a scratch card, user can swipe the mulch to see the view below.
A custom ImageView that is used to cover the surface of other view like a scratch card, user can swipe the mulch to see the view below.

MCScratchImageView GIF Showcase Requirments iOS 8.0+ Xcode 7.2+ Swift 4.0 Installation CocoaPods pod "MCScratchImageView" Manually Just drag MCScratch

Microblog-ref-app - A Twitter like social media app that users can share their moments
Microblog-ref-app - A Twitter like social media app that users can share their moments

HiPlace - iOS Table of Contents Introduction HMS Services Getting Started Suppor

Owner
null
Jogendra 113 Nov 28, 2022
React-native-photo-editor - Photo editor using native modules for iOS and Android

?? Image editor using native modules for iOS and Android. Inherit from 2 available libraries, ZLImageEditor (iOS) and PhotoEditor (Android)

Baron Ha. 244 Jan 5, 2023
Syntactic Sugar for Accelerate/vImage and Core Image Filters

ShinpuruImage Syntactic Sugar for Accelerate/vImage and Core Image Filters ShinpuruImage offers developers a consistent and strongly typed interface t

simon gladman 100 Jan 6, 2023
Simple image filters

Demo-Image-Filters Simple image filters Apply filters on images demo, Coded in swift language with below functionalities: Select image from phone gall

Jacky Patel 3 Dec 1, 2021
The collection of image filters with swift

SemanticImage The collection of image filters. How to use Setting Up 1, Add Sema

MLBoy 60 Dec 29, 2022
Image filtering UI library like Instagram.

Sharaku Usage How to present SHViewController let imageToBeFiltered = UIImage(named: "targetImage") let vc = SHViewController(image: imageToBeFiltered

Makoto Mori 1.5k Dec 20, 2022
📷 A composable image editor using Core Image and Metal.

Brightroom - Composable image editor - building your own UI Classic Image Editor PhotosCrop Face detection Masking component ?? v2.0.0-alpha now open!

Muukii 2.8k Jan 3, 2023
📷 A composable image editor using Core Image and Metal.

Brightroom - Composable image editor - building your own UI Classic Image Editor PhotosCrop Face detection Masking component ?? v2.0.0-alpha now open!

Muukii 2.8k Jan 2, 2023
PrettyBorder is a SwiftUI package for managing an customized border and background at any kind of view.

PrettyBorder Description PrettyBorder is a SwiftUI package for managing an customized border and background at any kind of view. Preview of end result

Ahmet Giray Uçar 2 Oct 13, 2021
Instant camera hybrid with multiple effects and filters written in Swift.

Kontax Cam Download on the app store! No longer on the app store Kontax Cam is an instant camera built 100% using Swift for iOS. You can take your pho

Kevin Laminto 108 Dec 27, 2022