Git Product home page Git Product logo

zlimageeditor's Introduction

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

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

Requirements

v >= 2.0.0 iOS 10.0+
v < 2.0.0 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

● 2.0.2
  Add:
    Adapt the text sticker input interface for iPad landscape mode.
  Fix:
    Fix the bug where cropping square images to circular shape fails.
● 2.0.1
  Add: 
    Adapt to iOS 17, replace UIGraphicsBeginImageContextWithOptions with UIGraphicsImageRenderer.
● 2.0.0
  Add:
    Enhancing the drawing tool with an eraser function.
    The minimum supported system has been upgraded from iOS 9 to iOS 10.
...

Languages

🇨🇳 Chinese (Simplified/Traditional), 🇺🇸 English, 🇯🇵 Japanese, 🇫🇷 French, 🇩🇪 German, 🇺🇦 Ukranian, 🇷🇺 Russian, 🇻🇳 Vietnamese, 🇰🇷 Korean, 🇲🇾 Malay, 🇮🇹 Italian, 🇮🇩 Indonesian, 🇪🇸 Spanish, 🇵🇹 Portuguese, 🇹🇷 Turkey, 🇸🇦 Arabic, 🇳🇱 Dutch.

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, '10.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 "2.0.2" 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.

Support

  • ★ Star this repo.
  • Support with or or

Demo Effect

image

zlimageeditor's People

Contributors

5anniversary avatar darquro avatar hirbod avatar lastsoul avatar longitachi avatar shadzik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zlimageeditor's Issues

Support custom ZLEditImageViewController

Hi,
I have an interface like this
Screen Shot 2022-05-13 at 10 58 23
Can I customize something for ZLEditImageViewController, background can't be zoomed and cropped, allows adding images from phone gallery instead of existing emojis

Crop doesn't work

Hey,

testing the Example app in a SImulator, I've come across a bug when cropping an image.

The fix is to add

resImage = resImage.clipImage(angle, editRect) ?? resImage

to ZLEditImageViewController in line 820.

Could you please update the code? Thank you!

text sticker not showing after hit done button

Hi , using latest update , when I use text sticker and user hit done button I found it gets empty box without text and sometimes it shows part of the text ,

but when I sent background to text and remove the background again , it fully shows

" pls not this only happen when I type arabic , and English is working "
screen shot

note : I was set red circle to show u the empty text box

Screenshot 2023-10-10 at 7 34 19 PM

I am getting a crash on Done button after editing the image

error = vImageScale_ARGB8888(&sourceBuffer, &destBuffer, nil, numericCast(kvImageHighQualityResampling))

Unfortunately, I am unable to give more information, it happens with XCode 13.3 and iOS 15.4.
Screenshot 2022-03-21 at 11 12 43
Screenshot 2022-03-21 at 11 12 58

Why are we using over 400 MB RAM by editing just 3 Images?

How to change icon in ToolBar ?

This is a great library.
But I want to custom Toolbar (change Icon Image, Color when it active, done/close button's style). How to do it?

Background color change

Hello,
Thank you for your works. I'm using it in iOS application and trying to modify an image with transparent background. However, when it saves the modified image, it saves image with white backgroud. I want to save it with transparent background. Is there any solution for this problem?

Thanks for the support in advance,

macOS support

it'd be great if this would work for macOS apps as well

请问如何选中图片后强制crop

目前设置clipRatios需要用户手动进入编辑状态才能生效,请问如何类似于twitter选择背景那样,强制图片的比例呢?

ps: crop之后,文字如果拖动到crop范围之外,就无法拖回来了。

center text

hi, thanks for great lib, i want to put text in center like facebook, did u support this? Thanks

图片编辑后,新的图片大小暴增

问题1:编辑前图片是7M,编辑后图片大小是23M,放大了好几倍。
问题2:选择图片后,点击编辑按钮,选择某一个功能准备编辑,但是没有实际的编辑操作,直接点击完成后,图片也算编辑后了的,导致新图片大小也暴增了。

Error if your application only supports landscape

One of my app only supports landscape and I get an error while I want to crop or insert text :
"Supported orientations has no common orientation with the application, and [ZLImageEditor.ZLClipImageViewController shouldAutorotate] is returning YES"

I think it's because "supportedInterfaceOrientations" is set to ".portrait" in "ZLInputTextViewController.swift" and "ZLClipImageViewController.swift" but I don't think it is mandatory here and maybe it can be removed...

Auto Scale Text size according to Gesture.

Hello,
Its Great Library for Photo Editing. I want to Increased or decreased size of text font according to Gesture on Box Corner.Can You please provide in your Library.

Thanks in Advanced.

Crop ,Contrast and saturation doesn't work perfectly

Hey,

I'm capturing the screen using below code:

UIGraphicsBeginImageContextWithOptions(remoteContainer.frame.size, false, 0);
remoteContainer.drawHierarchy(in: remoteContainer.bounds, afterScreenUpdates: true)
let image: UIImage = UIGraphicsGetImageFromCurrentImageContext()!
UIGraphicsEndImageContext()
return image

When I try to edit this captured image use crop function and I click on done , it changes the actual image ration. Same is happening with contrast , brightness and saturation.

iPhone 13,
ZLimage picker version: 1.1.1

Untitled.mp4

.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.