GPUImage源码阅读——图片编辑组件

ZMJImageEditor 是一个和微信一样图片编辑的组件,功能强大,极易集成,支持绘制、文字、旋转、剪裁、马赛克、擦除重绘等功能。

Base On

  • keshiim ZMJImageEditor(https://github.com/keshiim/ZMJImageEditor)

Feature

  • 1、Draw
  • 2、Text
  • 3、Mosica
  • 4、Crop/Rotate
  • 5、Erase/redraw

GIF

1.gif

ScreenShot

1.png
2.png
3.png
4.png
5.png
6.png
7.png
8.png
9.png
10.png

Usage

调起

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

回调

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

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

}

Requirements

  • iOS7+

Author

  • keshiim

  • Qinmin

Blog

  • 秦明Qinmin

Contact Me

To do

  • 贝塞尔曲线提高圆滑度
  • 分组渲染降低每次渲染顶点数

License

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

你可能感兴趣的:(GPUImage源码阅读——图片编辑组件)