Git Product home page Git Product logo

keshiim / zmjimageeditor Goto Github PK

View Code? Open in Web Editor NEW
502.0 18.0 102.0 100.46 MB

ZMJImageEditor is a picture editing component like WeChat. It is powerful and easy to integrate, supporting rendering, text, rotation, tailoring, mapping and other functions. (ZMJImageEditor 是一个和微信一样图片编辑的组件,功能强大,极易集成,支持绘制、文字、旋转、剪裁、贴图等功能)

License: MIT License

Ruby 0.64% Objective-C 99.36%
image editor wechat image-editor editor-helper imageeditor rotation clip draw testing

zmjimageeditor's Introduction

ZMJImageEditor

CI Status Version License Platform

功能介绍

Tailoring, graffiti, and writing. All kinds of rotations are done well, if you have bug, welcome issue, and the following are several GIF, support Internationale-localizable (剪裁、涂鸦、文字。各种旋转各种好完,如果有bug,欢迎issue,下面是几个介绍功能的GIF,支持国际化)

  1. draw功能

draw

  1. text

text text2

  1. clip,rotation

clip,rotation

  1. 支持贴图(paper) 新增

Usage

调起

WBGImageEditor *editor = [[WBGImageEditor alloc] initWithImage:_imageView.image delegate:self];
[self presentViewController:editor animated:YES completion:nil];

回调delegate

#pragma mark - WBGImageEditorDelegate
- (void)imageEditor:(WBGImageEditor *)editor didFinishEdittingWithImage:(UIImage *)image {
self.imageView.image = image;
[editor.presentingViewController dismissViewControllerAnimated:YES completion:nil];
}

- (void)imageEditorDidCancel:(WBGImageEditor *)editor {

}

增加了图片资源回调

#pragma mark - WBGImageEditorDataSource
- (NSArray<WBGMoreKeyboardItem *> *)imageItemsEditor:(WBGImageEditor *)editor {
    return @[
             [WBGMoreKeyboardItem createByTitle:@"p1" imagePath:@"p1" image:[UIImage imageNamed:@"p1"]],
             [WBGMoreKeyboardItem createByTitle:@"p2" imagePath:@"p2" image:[UIImage imageNamed:@"p2"]]
             ];
}

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

and this is the demo project

Requirements

iOS7+

Installation

ZMJImageEditor is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "ZMJImageEditor"

Author

keshiim, [email protected]

License

ZMJImageEditor is available under the MIT license. See the LICENSE file for more info.

zmjimageeditor's People

Contributors

keshiim avatar pujainx 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zmjimageeditor's Issues

没有马赛克

没有入口能看到马赛克效果呢?能提供个入口吗?谢谢

pod "ZMJImageEditor" on Xcode11

Multiple commands produce '~/Library/Developer/Xcode/DerivedData/IOS图片编辑-efzbywzcrgwtbnazcvwhksofrzih/Build/Products/Debug-iphonesimulator/IOS图片编辑.app/Assets.car':

  1. Target 'IOS图片编辑' (project 'IOS图片编辑') has compile command with input '/Users/wangsheng/Documents/IOS图片编辑/IOS图片编辑/Assets.xcassets'
  2. That command depends on command in Target 'IOS图片编辑' (project 'IOS图片编辑'): script phase “[CP] Copy Pods Resources”

屏幕适配

我试了5s,屏幕按钮被遮挡。
横屏显示的时候,布局错乱。

贴纸-裁剪-贴纸-裁剪会导致bug

复现步骤:
1、选择贴纸放在图片中间
2、选择裁剪,将宽度减小
3、选择贴纸放在图片中间
4、裁剪,发现第二张贴纸有明显位移

你好,我发现BUG

跳转到ZMJImageEditor页面右边有条黑边,需要点击一下才会隐藏,编辑文字,第一次编辑后,第二次编辑没有把第一次编辑的内容传到编辑页面,导致第二次编辑的会加上第一次编辑的内容,第一次打开红色圆点没有点击状态

Example is broken

I just run it and try to crop immediately:

- (instancetype)initWithCroppingStyle:(TOCropViewCroppingStyle)style image:(UIImage *)image
{
    NSParameterAssert(image);

ColorfullButton中有个会引起crach的问题

for (CALayer *layer in self.layer.sublayers) { [layer removeFromSuperlayer]; }
集成sdk后会报找不到父layer的错误,引发的对象是UIButtonLabel,没有分析出原因。
目前removeFromSuperlayer之前判断一下layer的hidden属性可以规避这一问题。

在iPhone XMax上运行,使用功能崩溃

主要崩溃在

  • (void)drawCirle {

// if (self.layer && self.layer.sublayers.count > 0) {
// for (CALayer *layer in self.layer.sublayers) {
// if (!layer.hidden) [layer removeFromSuperlayer];
// }
// }

iPhone XMas 崩溃

我在模拟器上裁剪图片的时候崩溃,生成图片为空,然后就进断言了

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.