├── .gitignore ├── .gitignore.bak ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── dictionaries │ └── wangyanjing.xml ├── encodings.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── README.md ├── README.md.bak ├── assets ├── crop.png ├── edit_erweima.png ├── edit_image.png ├── mosaic.png └── paint.png ├── build.gradle ├── demo ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── stickers │ │ ├── type1 │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ └── 5.png │ │ ├── type2 │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 6.png │ │ ├── 7.png │ │ └── 8.png │ │ ├── type3 │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 15.png │ │ ├── 16.png │ │ └── 17.png │ │ ├── type4 │ │ ├── 18.png │ │ ├── 21.png │ │ ├── 22.png │ │ ├── 23.png │ │ └── 24.png │ │ ├── type5 │ │ ├── 25.png │ │ ├── 26.png │ │ ├── 27.png │ │ └── 28.png │ │ └── type6 │ │ ├── 20.png │ │ ├── 22.png │ │ ├── 23.png │ │ ├── 3.png │ │ └── 7.png │ ├── java │ └── com │ │ └── yjing │ │ └── imageeditandroid │ │ ├── FileUtils.java │ │ └── MainActivity.java │ └── res │ ├── layout │ └── activity_main.xml │ ├── menu │ └── menu_main.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── values-w820dp │ └── dimens.xml │ ├── values-zh │ └── strings.xml │ └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── imageeditlibrary ├── .gitignore ├── build.gradle ├── jni │ ├── Android.mk │ ├── Application.mk │ ├── bicubic_resize.c │ ├── bitmap.c │ ├── bitmap.h │ ├── blur.c │ ├── colour_space.c │ ├── colour_space.h │ ├── filter.c │ ├── matrix.c │ ├── mem_utils.c │ ├── mem_utils.h │ ├── nanojpeg.c │ ├── photo_processing.c │ ├── transform.c │ └── transform.h ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── yjing │ │ └── imageeditlibrary │ │ ├── BaseActivity.java │ │ ├── editimage │ │ ├── EditImageActivity.java │ │ ├── StrickerAdapter.java │ │ ├── contorl │ │ │ └── SaveMode.java │ │ ├── fliter │ │ │ └── PhotoProcessing.java │ │ ├── fragment │ │ │ ├── AddTextFragment.java │ │ │ ├── BaseFragment.java │ │ │ ├── CropFragment.java │ │ │ ├── FliterListFragment.java │ │ │ ├── MainMenuFragment.java │ │ │ ├── MosaicFragment.java │ │ │ ├── PaintFragment.java │ │ │ ├── RotateFragment.java │ │ │ └── StirckerFragment.java │ │ ├── inter │ │ │ ├── EditFunctionOperationInterface.java │ │ │ ├── ImageEditInte.java │ │ │ └── SaveCompletedInte.java │ │ ├── model │ │ │ ├── RatioItem.java │ │ │ └── StickerBean.java │ │ ├── task │ │ │ └── StickerTask.java │ │ ├── ui │ │ │ └── ColorPicker.java │ │ └── view │ │ │ ├── ColorSeekBar.java │ │ │ ├── Constants.java │ │ │ ├── CropImageView.java │ │ │ ├── CustomPaintView.java │ │ │ ├── CustomViewPager.java │ │ │ ├── PaintModeView.java │ │ │ ├── PaintPath.java │ │ │ ├── RotateImageView.java │ │ │ ├── StickerItem.java │ │ │ ├── StickerView.java │ │ │ ├── TextStickerView.java │ │ │ ├── imagezoom │ │ │ ├── ImageViewTouch.java │ │ │ ├── ImageViewTouchBase.java │ │ │ ├── easing │ │ │ │ ├── Back.java │ │ │ │ ├── Bounce.java │ │ │ │ ├── Circ.java │ │ │ │ ├── Cubic.java │ │ │ │ ├── Easing.java │ │ │ │ ├── Elastic.java │ │ │ │ ├── Expo.java │ │ │ │ ├── Linear.java │ │ │ │ ├── Quad.java │ │ │ │ ├── Quart.java │ │ │ │ ├── Quint.java │ │ │ │ └── Sine.java │ │ │ ├── graphic │ │ │ │ ├── FastBitmapDrawable.java │ │ │ │ └── IBitmapDrawable.java │ │ │ └── utils │ │ │ │ ├── DecodeUtils.java │ │ │ │ ├── ExifUtils.java │ │ │ │ ├── IDisposable.java │ │ │ │ └── IOUtils.java │ │ │ └── mosaic │ │ │ ├── MosaicPath.java │ │ │ ├── MosaicUtil.java │ │ │ └── MosaicView.java │ │ ├── picchooser │ │ ├── BucketItem.java │ │ ├── BucketsFragment.java │ │ ├── GalleryAdapter.java │ │ ├── GridItem.java │ │ ├── ImagesFragment.java │ │ ├── Logger.java │ │ ├── SelectPictureActivity.java │ │ └── SquareImageView.java │ │ └── utils │ │ ├── BitmapUtils.java │ │ ├── DensityUtil.java │ │ ├── FileUtils.java │ │ ├── Matrix3.java │ │ ├── PaintUtil.java │ │ └── RectUtil.java │ ├── jniLibs │ ├── arm64-v8a │ │ └── libphotoprocessing.so │ ├── armeabi-v7a │ │ └── libphotoprocessing.so │ ├── armeabi │ │ └── libphotoprocessing.so │ ├── mips │ │ └── libphotoprocessing.so │ ├── mips64 │ │ └── libphotoprocessing.so │ ├── x86 │ │ └── libphotoprocessing.so │ └── x86_64 │ │ └── libphotoprocessing.so │ └── res │ ├── anim │ ├── in_bottom_to_top.xml │ ├── menuhide.xml │ ├── menushow.xml │ └── out_bottom_to_top.xml │ ├── drawable-hdpi │ ├── back_arrow.png │ ├── blue_thumb_default.png │ ├── blue_thumb_pressed.png │ ├── green_thumb_default.png │ ├── green_thumb_pressed.png │ ├── icon_title_bar_back.png │ ├── red_thumb_default.png │ └── red_thumb_pressed.png │ ├── drawable-mdpi │ ├── blue_thumb_default.png │ ├── blue_thumb_pressed.png │ ├── green_thumb_default.png │ ├── green_thumb_pressed.png │ ├── red_thumb_default.png │ └── red_thumb_pressed.png │ ├── drawable-xhdpi │ ├── back_arrow.png │ ├── blue_thumb_default.png │ ├── blue_thumb_pressed.png │ ├── crop_normal.png │ ├── crop_pressed.png │ ├── edit_image_brush_mosaic_btn.png │ ├── edit_image_brush_mosaic_btn_select.png │ ├── edit_image_cancel_btn.png │ ├── edit_image_cancel_btn_select.png │ ├── edit_image_confirm_btn.png │ ├── edit_image_confirm_btn_select.png │ ├── edit_image_crop_btn.png │ ├── edit_image_crop_btn_select.png │ ├── edit_image_emotion_btn.png │ ├── edit_image_emotion_btn_select.png │ ├── edit_image_mosaic_tool_btn.png │ ├── edit_image_mosaic_tool_btn_select.png │ ├── edit_image_pen_tool_btn.png │ ├── edit_image_pen_tool_btn_select.png │ ├── edit_image_revoke_btn.png │ ├── edit_image_text_tool_btn.png │ ├── edit_image_text_tool_btn_select.png │ ├── edit_image_traditional_mosaic_btn.png │ ├── edit_image_traditional_mosaic_btn_select.png │ ├── eraser_normal.png │ ├── eraser_seleced.png │ ├── fliters_normal.png │ ├── fliters_pressed.png │ ├── green_thumb_default.png │ ├── green_thumb_pressed.png │ ├── hi4.png │ ├── ic_menu_gallery.png │ ├── image_edit_back.png │ ├── red_thumb_default.png │ ├── red_thumb_pressed.png │ ├── sticker_delete.png │ ├── sticker_normal.png │ ├── sticker_pressed.png │ ├── sticker_rotate.png │ ├── stickers_type_animal.png │ ├── stickers_type_cos.png │ ├── stickers_type_decoration.png │ ├── stickers_type_frame.png │ ├── stickers_type_mark.png │ ├── stickers_type_motion.png │ ├── stickers_type_number.png │ ├── stickers_type_profession.png │ ├── stickers_type_spring.png │ ├── stickers_type_text.png │ ├── texture_normal.png │ ├── texture_pressed.png │ └── yd_image_tx.png │ ├── drawable-xxhdpi │ ├── blue_thumb_default.png │ ├── blue_thumb_pressed.png │ ├── edit_image_brush_mosaic_btn.png │ ├── edit_image_brush_mosaic_btn_select.png │ ├── edit_image_cancel_btn.png │ ├── edit_image_cancel_btn_select.png │ ├── edit_image_confirm_btn.png │ ├── edit_image_confirm_btn_select.png │ ├── edit_image_crop_btn.png │ ├── edit_image_crop_btn_select.png │ ├── edit_image_emotion_board_roll.png │ ├── edit_image_emotion_btn.png │ ├── edit_image_emotion_btn_select.png │ ├── edit_image_mosaic_tool_btn.png │ ├── edit_image_mosaic_tool_btn_select.png │ ├── edit_image_pen_tool_btn.png │ ├── edit_image_pen_tool_btn_select.png │ ├── edit_image_revoke_btn.png │ ├── edit_image_text_tool_btn.png │ ├── edit_image_text_tool_btn_select.png │ ├── edit_image_traditional_mosaic_btn.png │ ├── edit_image_traditional_mosaic_btn_select.png │ ├── green_thumb_default.png │ ├── green_thumb_pressed.png │ ├── red_thumb_default.png │ └── red_thumb_pressed.png │ ├── drawable │ ├── edit_image_brush_mosaic_selector.xml │ ├── edit_image_cancel_selector.xml │ ├── edit_image_confirm_selector.xml │ ├── edit_image_crop_selector.xml │ ├── edit_image_emotion_selector.xml │ ├── edit_image_mosaic_tool_selector.xml │ ├── edit_image_pen_tool_selector.xml │ ├── edit_image_text_tool_selector.xml │ ├── edit_image_traditional_mosaic_selector.xml │ ├── image_edit_icon_crop.xml │ ├── image_edit_icon_filter.xml │ ├── image_edit_icon_sticker.xml │ ├── image_edit_icon_text.xml │ ├── materialcolorpicker__blue_progress.xml │ ├── materialcolorpicker__blue_thumb_drawable.xml │ ├── materialcolorpicker__color_button.xml │ ├── materialcolorpicker__color_button_16.xml │ ├── materialcolorpicker__green_progress.xml │ ├── materialcolorpicker__green_thumb_drawable.xml │ ├── materialcolorpicker__red_thumb_drawable.xml │ ├── red_progress.xml │ └── shape_rect.xml │ ├── layout │ ├── activity_image_edit.xml │ ├── activity_main.xml │ ├── bucketitem.xml │ ├── edit_image_header.xml │ ├── fragment_edit_image_add_text.xml │ ├── fragment_edit_image_crop.xml │ ├── fragment_edit_image_fliter.xml │ ├── fragment_edit_image_main_menu.xml │ ├── fragment_edit_image_rotate.xml │ ├── fragment_edit_image_sticker_type.xml │ ├── fragment_edit_paint.xml │ ├── fragment_mosaic.xml │ ├── gallery.xml │ ├── imageitem.xml │ ├── materialcolorpicker__layout_color_picker.xml │ ├── materialcolorpicker__layout_color_picker_old_android.xml │ ├── view_color_more_panel.xml │ ├── view_set_stoke_width.xml │ ├── view_sticker_item.xml │ └── view_sticker_type_item.xml │ ├── values-w820dp │ └── dimens.xml │ ├── values-zh │ └── strings.xml │ └── values │ ├── attrs.xml │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | # Files for the ART/Dalvik VM 5 | *.dex 6 | # Java class files 7 | *.class 8 | # Generated files 9 | bin/ 10 | gen/ 11 | out/ 12 | # Gradle files 13 | .gradle/ 14 | build/ 15 | # Local configuration file (sdk path, etc) 16 | local.properties 17 | # Proguard folder generated by Eclipse 18 | proguard/ 19 | # Log Files 20 | *.log 21 | # Android Studio Navigation editor temp files 22 | .navigation/ 23 | # Android Studio captures folder 24 | captures/ 25 | # Intellij 26 | *.iml 27 | .idea/workspace.xml 28 | .idea/libraries 29 | # Keystore files 30 | *.jks -------------------------------------------------------------------------------- /.gitignore.bak: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/dictionaries/wangyanjing.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | Android 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 62 | 63 | C:\Users\wangyanjing\AppData\Roaming\Subversion 64 | 65 | 66 | 67 | 68 | 69 | 1.8 70 | 71 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SimpleImageEditor 2 | 3 | 高仿微信的图片编辑器 4 | 5 | ### 基本功能 6 | 7 | * 涂鸦 8 | * 贴图 9 | * 添加文字 10 | * 马赛克 11 | * 截图功能 12 | * 对操作进行撤销 13 | 14 | 15 | ![主界面](https://github.com/YanJingW/SimpleImageEditor/blob/master/assets/edit_image.png) 16 | 17 | ![涂鸦界面](https://github.com/YanJingW/SimpleImageEditor/blob/master/assets/paint.png) 18 | 19 | ![马赛克界面](https://github.com/YanJingW/SimpleImageEditor/blob/master/assets/mosaic.png) 20 | 21 | ![剪切界面](https://github.com/YanJingW/SimpleImageEditor/blob/master/assets/crop.png) 22 | 23 | 24 | ### 项目现有缺陷 25 | 26 | * 马赛克操作有些卡顿,后续需要优化 27 | * 裁剪的实现,没有实现在保存之前的状态的基础上进行操作。简单粗暴直接将之前所有操作生成一张图片,替换为操作图片 28 | 29 | ### 版本更新 30 | 31 | * 1.0.0 涂鸦,贴图,添加文字,马赛克,截图功能,对操作进行撤销 32 | * 1.0.1 马赛克功能可以自由在不同的样式之间切换 33 | 34 | ### APK Demo 35 | 36 | 扫码下载 37 | 38 | ![image](https://github.com/YanJingW/SimpleImageEditor/blob/master/assets/edit_erweima.png ) 39 | 40 | 二维码显示不出请点击 [下载Demo](https://fir.im/imageEditAndroid ) -------------------------------------------------------------------------------- /README.md.bak: -------------------------------------------------------------------------------- 1 | # SimpleImageEditor 2 | 高仿微信的图片编辑器,包括涂鸦,贴图,添加文字,马赛克,截图功能 3 | 4 | ### APK Demo 5 | 扫码下载 6 | ![image](https://github.com/YanJingW/SimpleImageEditor/tree/master/assets/edit_erweima.png) 7 | 二维码显示不出请点击 [下载Demo](http://fir.im/imageEditAndroid ) -------------------------------------------------------------------------------- /assets/crop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/assets/crop.png -------------------------------------------------------------------------------- /assets/edit_erweima.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/assets/edit_erweima.png -------------------------------------------------------------------------------- /assets/edit_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/assets/edit_image.png -------------------------------------------------------------------------------- /assets/mosaic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/assets/mosaic.png -------------------------------------------------------------------------------- /assets/paint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/assets/paint.png -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.3.0' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | 21 | 22 | subprojects { 23 | ext.compileSdkVer = 24 24 | ext.buildToolsVer = "25.0.0" 25 | ext.supportLibVer = "24.0.0" 26 | } 27 | 28 | 29 | ext { 30 | compileSdkVersion = 24 31 | buildToolsVersion = "25.0.0" 32 | minsdkVersion = 14 33 | targetSdkVersion = 23 34 | } 35 | -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /demo/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion '25.0.2' 6 | 7 | lintOptions { 8 | checkReleaseBuilds false//不开启lint检查,建议抽空开启为true打包,然后修复各种不规范的地方; 9 | abortOnError false 10 | } 11 | 12 | defaultConfig { 13 | applicationId "com.yjing.imageeditor" 14 | minSdkVersion 16 15 | targetSdkVersion 23 16 | versionCode 101 17 | versionName "1.0.1" 18 | } 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | } 26 | 27 | dependencies { 28 | compile fileTree(include: ['*.jar'], dir: 'libs') 29 | compile 'com.android.support:appcompat-v7:23.1.1' 30 | compile project(':imageeditlibrary') 31 | } 32 | -------------------------------------------------------------------------------- /demo/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\android\android-sdk-windows/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /demo/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 9 | 10 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type1/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type1/1.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type1/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type1/2.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type1/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type1/3.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type1/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type1/4.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type1/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type1/5.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type2/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type2/11.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type2/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type2/12.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type2/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type2/6.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type2/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type2/7.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type2/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type2/8.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type3/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type3/13.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type3/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type3/14.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type3/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type3/15.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type3/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type3/16.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type3/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type3/17.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type4/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type4/18.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type4/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type4/21.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type4/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type4/22.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type4/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type4/23.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type4/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type4/24.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type5/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type5/25.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type5/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type5/26.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type5/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type5/27.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type5/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type5/28.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type6/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type6/20.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type6/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type6/22.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type6/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type6/23.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type6/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type6/3.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type6/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanJingW/SimpleImageEditor/ea608429d5c567dd6f753cddff17c71d28d3efb2/demo/src/main/assets/stickers/type6/7.png -------------------------------------------------------------------------------- /demo/src/main/java/com/yjing/imageeditandroid/FileUtils.java: -------------------------------------------------------------------------------- 1 | package com.yjing.imageeditandroid; 2 | 3 | import java.io.File; 4 | import java.io.FileOutputStream; 5 | import java.io.IOException; 6 | import java.math.BigDecimal; 7 | 8 | import android.content.Context; 9 | import android.graphics.Bitmap; 10 | import android.net.ConnectivityManager; 11 | import android.net.NetworkInfo; 12 | import android.os.Environment; 13 | 14 | /** 15 | * 文件相关辅助类 16 | */ 17 | public class FileUtils { 18 | public static final String FOLDER_NAME = "imageeidtor"; 19 | 20 | /** 21 | * 获取存贮文件的文件夹路径 22 | * 23 | * @return 24 | */ 25 | public static File createFolders() { 26 | File baseDir; 27 | if (android.os.Build.VERSION.SDK_INT < 8) { 28 | baseDir = Environment.getExternalStorageDirectory(); 29 | } else { 30 | baseDir = Environment 31 | .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); 32 | } 33 | if (baseDir == null) 34 | return Environment.getExternalStorageDirectory(); 35 | File aviaryFolder = new File(baseDir, FOLDER_NAME); 36 | if (aviaryFolder.exists()) 37 | return aviaryFolder; 38 | if (aviaryFolder.isFile()) 39 | aviaryFolder.delete(); 40 | if (aviaryFolder.mkdirs()) 41 | return aviaryFolder; 42 | return Environment.getExternalStorageDirectory(); 43 | } 44 | 45 | public static File genEditFile() { 46 | return FileUtils.getEmptyFile("tietu" 47 | + System.currentTimeMillis() + ".jpg"); 48 | } 49 | 50 | public static File getEmptyFile(String name) { 51 | File folder = FileUtils.createFolders(); 52 | if (folder != null) { 53 | if (folder.exists()) { 54 | File file = new File(folder, name); 55 | return file; 56 | } 57 | } 58 | return null; 59 | } 60 | 61 | /** 62 | * 删除指定文件 63 | * 64 | * @param path 65 | * @return 66 | */ 67 | public static boolean deleteFileNoThrow(String path) { 68 | File file; 69 | try { 70 | file = new File(path); 71 | } catch (NullPointerException e) { 72 | return false; 73 | } 74 | 75 | if (file.exists()) { 76 | return file.delete(); 77 | } 78 | return false; 79 | } 80 | 81 | /** 82 | * 保存图片 83 | * 84 | * @param bitName 85 | * @param mBitmap 86 | */ 87 | public static String saveBitmap(String bitName, Bitmap mBitmap) { 88 | File baseFolder = createFolders(); 89 | File f = new File(baseFolder.getAbsolutePath(), bitName); 90 | FileOutputStream fOut = null; 91 | try { 92 | f.createNewFile(); 93 | fOut = new FileOutputStream(f); 94 | } catch (IOException e) { 95 | e.printStackTrace(); 96 | } 97 | mBitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut); 98 | try { 99 | fOut.flush(); 100 | fOut.close(); 101 | } catch (IOException e) { 102 | e.printStackTrace(); 103 | } 104 | return f.getAbsolutePath(); 105 | } 106 | 107 | // 获取文件夹大小 108 | public static long getFolderSize(File file) throws Exception { 109 | long size = 0; 110 | try { 111 | File[] fileList = file.listFiles(); 112 | for (int i = 0; i < fileList.length; i++) { // 如果下面还有文件 113 | if (fileList[i].isDirectory()) { 114 | size = size + getFolderSize(fileList[i]); 115 | } else { 116 | size = size + fileList[i].length(); 117 | } 118 | } 119 | } catch (Exception e) { 120 | e.printStackTrace(); 121 | } 122 | return size; 123 | } 124 | 125 | /** 126 | * 格式化单位 * * @param size * @return 127 | */ 128 | public static String getFormatSize(double size) { 129 | double kiloByte = size / 1024d; 130 | int megaByte = (int) (kiloByte / 1024d); 131 | return megaByte + "MB"; 132 | } 133 | 134 | public static boolean isConnect(Context context) { 135 | try { 136 | ConnectivityManager connectivity = (ConnectivityManager) context 137 | .getSystemService(Context.CONNECTIVITY_SERVICE); 138 | if (connectivity != null) { 139 | NetworkInfo info = connectivity.getActiveNetworkInfo(); 140 | if (info != null && info.isConnected()) { 141 | if (info.getState() == NetworkInfo.State.CONNECTED) { 142 | return true; 143 | } 144 | } 145 | } 146 | } catch (Exception e) { 147 | 148 | } 149 | return false; 150 | } 151 | 152 | }// end 153 | -------------------------------------------------------------------------------- /demo/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 9 | 10 | 16 | 17 |