ZLImageEditor icon indicating copy to clipboard operation
ZLImageEditor copied to clipboard

A powerful image editor framework. Supports graffiti, cropping, mosaic, text stickers, image stickers, filters.

Version Carthage compatible SwiftPM compatible License Platform Language


ZLImageEditor is a powerful image editor framework. Supports graffiti, cropping, mosaic, text stickers, picture stickers, filters, adjust(brightness, contrast, saturation).

ZLImageEditor is extracted from ZLPhotoBrowser.

Directory

  • Features
  • Requirements
  • Usage
  • Change Log
  • Languages
  • Installation(Support Cocoapods/Carthage/SPM)
  • Demo Effect

Features

  • [x] Draw (Support custom line color).
  • [x] Crop (Support custom crop ratios).
  • [x] Image sticker (Support custom image sticker container view).
  • [x] Text sticker (Support custom text color).
  • [x] Mosaic.
  • [x] Filter (Support custom filters).
  • [x] Adjust (Brightness, Contrast, Saturation).

Requirements

  • iOS 9.0
  • Swift 5.x
  • Xcode 12.x

Usage

ZLImageEditorConfiguration.default()
    .editImageTools([.draw, .clip, .imageSticker, .textSticker, .mosaic, .filter, .adjust])
    .adjustTools([.brightness, .contrast, .saturation])

ZLEditImageViewController.showEditImageVC(parentVC: self, image: image, editModel: editModel) { [weak self] (resImage, editModel) in
    // your code
}

Change Log

More logs

● 1.1.1
  Add:
    Can select custom font before adding text sticker.
    Change the authority of ZLEditImageViewController to open.
    Add ZLImageEditorUIConfiguration.
● 1.0.7
    Fix the bug that crop does not work.
● 1.0.6
    Revert the code for image compression.
...

Languages

🇨🇳 Chinese, 🇺🇸 English, 🇯🇵 Japanese, 🇫🇷 French, 🇩🇪 German, 🇷🇺 Russian, 🇻🇳 Vietnamese, 🇰🇷 Korean, 🇲🇾 Malay, 🇮🇹 Italian, 🇮🇩Indonesian.

Installation

There are four ways to use ZLImageEditor in your project:

  • using CocoaPods
  • using Carthage
  • using Swift Package Manager
  • manual install (build frameworks or embed Xcode Project)

CocoaPods

To integrate ZLImageEditor into your Xcode project using CocoaPods, specify it to a target in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target 'MyApp' do
  # your other pod
  # ...
  pod 'ZLImageEditor'
end

Then, run the following command:

$ pod install

If you cannot find the latest version, you can execute pod repo update first

Carthage

To integrate ZLImageEditor into your Xcode project using Carthage, specify it in your Cartfile:

github "longitachi/ZLImageEditor"

Then, run the following command to build the ZLImageEditor framework:

$ carthage update ZLImageEditor

Swift Package Manager

  1. Select File > Swift Packages > Add Package Dependency. Enter https://github.com/longitachi/ZLImageEditor.git in the "Choose Package Repository" dialog.
  2. In the next page, specify the version resolving rule as "Up to Next Major" with "4.0.9" as its earliest version.
  3. After Xcode checking out the source and resolving the version, you can choose the "ZLImageEditor" library and add it to your app target.

Demo Effect

image