Git Product home page Git Product logo

psimageeditors's Introduction

PSImageEditors

PSImageEditors(简而至美的一个图片编辑器 )

开源一个图片编辑组件,样式参照微信与钉钉的图片编辑效果,支持包括涂鸦,添加文字,添加马赛克,裁剪等功能,内部线上项目已使用此组件。

功能

画笔

1.jpg

文字(支持更换文字背景颜色)

2.jpg 3.jpg

马赛克(两种马赛克样式)

4.jpg

裁剪

5.jpg

Installation 安装

1,手动安装

下载Demo后,将子文件夹PSImageEditors拖入到项目中, 导入头文件PSImageEditors.h开始使用,注意: 项目中需要有Masonry.1.1.0!

2,CocoaPods安装

pod 'PSImageEditors' 如果发现pod search PSImageEditors 不是最新版本,可在终端执行 pod repo update 更新本地仓库,更新完成重新搜索即可。

3,导入头文件 #import "PSImageEditors.h"

UIImage *image = [UIImage imageNamed:@"[email protected]"];
PSImageEditor *imageEditor = [[PSImageEditor alloc] initWithImage:image delegate:self dataSource:self];
[self.navigationController pushViewController:imageEditor animated:YES];

4,PSImageEditorDelegate

#pragma mark - PSImageEditorDelegate

- (void)imageEditor:(PSImageEditor *)editor didFinishEdittingWithImage:(UIImage *)image {
self.imageView.image = image;
[editor dismiss];
NSLog(@"%s",__func__);
}

- (void)imageEditorDidCancel {
NSLog(@"%s",__func__);
}

5,参数设置

#pragma mark - PSImageEditorDelegate

- (UIColor *)imageEditorDefaultColor {
return [UIColor redColor];
}

- (PSImageEditorMode)imageEditorDefalutEditorMode {
return PSImageEditorModeDraw;
}

- (CGFloat)imageEditorDrawPathWidth {
return 5;
}

- (UIFont *)imageEditorTextFont {
return [UIFont boldSystemFontOfSize:24];
}

Requirements 要求

  • iOS 8+
  • Xcode 8+

更新日志

- 2018.06.14 (tag:0.1.0):提交0.1.0版本
- 2020.07.16 (tag:0.2.0): 修复编辑图片模糊的问题,UI更新
- 2020.07.23 (tag:0.2.1): 增加默认选中编辑选项功能
- 2020.08.19 (tag:0.2.2): 底部ToolBar修改,文字组件优化体验

psimageeditors's People

Contributors

paintingstyle 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

Watchers

 avatar  avatar

psimageeditors's Issues

手动安装,头文件缺失

你好,你首先创建有一个Masonry的新工程,然后按步骤手动安装,你就会发现很多地方报头文件缺失问题。
我推测是你工程用了pch或者全局宏,但是新工程并没有用这些,导致别人使用你的库,手动导入时,必须在每个缺失文件中手动加入#import <Masonry.h>,#import "PSImageEditorDefine.h"等等头文件,希望优化下。

马赛克bug

当选择多张图片一起编辑,先编辑一张,然后选择第二种编辑打马赛克,第一张图片会出现在打马赛克的部分。感觉第一张图片被叠加在第二种图片下面

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.