├── .gitignore ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml ├── statistic.xml └── vcs.xml ├── ImageEditor-Android.iml ├── README.md ├── build.gradle ├── demo ├── .gitignore ├── build.gradle ├── demo.iml ├── 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 │ │ └── xinlan │ │ └── 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 │ └── xml │ └── file_paths.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── imageeditlibrary ├── .gitignore ├── build.gradle ├── imageeditlibrary.iml ├── jni │ ├── Android.mk │ ├── Application.mk │ ├── beauty.h │ ├── 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 │ │ │ └── xinlan │ │ │ └── imageeditlibrary │ │ │ ├── BaseActivity.java │ │ │ ├── editimage │ │ │ ├── EditImageActivity.java │ │ │ ├── ModuleConfig.java │ │ │ ├── adapter │ │ │ │ ├── ColorListAdapter.java │ │ │ │ ├── StickerAdapter.java │ │ │ │ └── StickerTypeAdapter.java │ │ │ ├── fliter │ │ │ │ └── PhotoProcessing.java │ │ │ ├── fragment │ │ │ │ ├── AddTextFragment.java │ │ │ │ ├── BaseEditFragment.java │ │ │ │ ├── BeautyFragment.java │ │ │ │ ├── CropFragment.java │ │ │ │ ├── FilterListFragment.java │ │ │ │ ├── MainMenuFragment.java │ │ │ │ ├── PaintFragment.java │ │ │ │ ├── RotateFragment.java │ │ │ │ └── StickerFragment.java │ │ │ ├── model │ │ │ │ ├── RatioItem.java │ │ │ │ └── StickerBean.java │ │ │ ├── task │ │ │ │ └── StickerTask.java │ │ │ ├── ui │ │ │ │ └── ColorPicker.java │ │ │ ├── utils │ │ │ │ ├── BitmapUtils.java │ │ │ │ ├── DensityUtil.java │ │ │ │ ├── FileUtil.java │ │ │ │ ├── ListUtil.java │ │ │ │ ├── Matrix3.java │ │ │ │ ├── PaintUtil.java │ │ │ │ └── RectUtil.java │ │ │ ├── view │ │ │ │ ├── Constants.java │ │ │ │ ├── CropImageView.java │ │ │ │ ├── CustomPaintView.java │ │ │ │ ├── CustomViewPager.java │ │ │ │ ├── PaintModeView.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 │ │ │ │ │ ├── ExifUtils.java │ │ │ │ │ ├── IDisposable.java │ │ │ │ │ └── IOUtils.java │ │ │ └── widget │ │ │ │ ├── EditCache.java │ │ │ │ └── RedoUndoController.java │ │ │ └── picchooser │ │ │ ├── BucketItem.java │ │ │ ├── BucketsFragment.java │ │ │ ├── GalleryAdapter.java │ │ │ ├── GridItem.java │ │ │ ├── ImagesFragment.java │ │ │ ├── Logger.java │ │ │ ├── SelectPictureActivity.java │ │ │ └── SquareImageView.java │ ├── jniLibs │ │ ├── arm64-v8a │ │ │ └── libphotoprocessing.so │ │ ├── armeabi-v7a │ │ │ └── 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 │ │ ├── red_thumb_default.png │ │ ├── red_thumb_pressed.png │ │ ├── redo.png │ │ └── uodo.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 │ │ ├── eraser_normal.png │ │ ├── eraser_seleced.png │ │ ├── fliters_normal.png │ │ ├── fliters_pressed.png │ │ ├── green_thumb_default.png │ │ ├── green_thumb_pressed.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 │ │ ├── green_thumb_default.png │ │ ├── green_thumb_pressed.png │ │ ├── red_thumb_default.png │ │ └── red_thumb_pressed.png │ │ ├── drawable │ │ ├── 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 │ │ ├── fragment_edit_image_add_text.xml │ │ ├── fragment_edit_image_beauty.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 │ │ ├── gallery.xml │ │ ├── imageitem.xml │ │ ├── materialcolorpicker__layout_color_picker.xml │ │ ├── materialcolorpicker__layout_color_picker_old_android.xml │ │ ├── view_color_more_panel.xml │ │ ├── view_color_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 │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── imageeditlibrary │ └── editimage │ ├── EditCacheTest.java │ └── ImageEditTest.java ├── screens ├── gif1.gif ├── gif2.gif ├── gif3.gif ├── gif4.gif ├── gif5.gif ├── gif6.gif ├── gif7.gif └── gif8_redo_undo.gif └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/statistic.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ImageEditor-Android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # AndroidImageEditor 3 | 4 | [![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu) 5 | 6 | #### For edit image,supply stickers filter rotate crop textstciker doodle 7 | 8 | ## Version History 9 | 10 | ### NextVersion 11 | mosaic 马赛克打码功能 此功能已在 另一个项目ImageEditorGL中实现 [ImageEditorGL](https://github.com/siwangqishiq/ImageEditorGL)。 12 | 13 | ### v_3.3: 14 | - [x] redo and undo 15 |
16 | 17 | 18 | ### v_3.2: 19 | - [x] add Smooth skin and White skin 20 |
21 | 22 | ### v_3.1: 23 | - [x] text support multiply line(done) save image when click save button (not apply) 24 | ### v_3.0: 25 | - [x] doodle mode (done) 26 | ### v_2.0: 27 | - [x] add the textimage 28 | 29 | 30 | 31 | ### 动态效果图 32 | 33 |
34 | 35 |
36 | 37 |
38 | 39 |
40 | 41 |
42 | 43 |
44 | 45 | 46 | #### 使用方法:见DEMO示例 47 | #### usage:see the demo project 48 | 49 | License 50 | ------- 51 | 52 | MIT is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). 53 | 54 | -------------------------------------------------------------------------------- /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 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.4.0' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | jcenter() 19 | google() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /demo/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | buildToolsVersion '28.0.3' 6 | 7 | defaultConfig { 8 | applicationId "com.xinlan.imageeditandroid" 9 | minSdkVersion 16 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | api fileTree(include: ['*.jar'], dir: 'libs') 24 | api 'androidx.appcompat:appcompat:1.0.0' 25 | api project(':imageeditlibrary') 26 | } 27 | -------------------------------------------------------------------------------- /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 | 8 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 37 | 38 | 39 | 40 | 45 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type1/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type1/1.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type1/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type1/2.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type1/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type1/3.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type1/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type1/4.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type1/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type1/5.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type2/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type2/11.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type2/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type2/12.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type2/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type2/6.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type2/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type2/7.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type2/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type2/8.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type3/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type3/13.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type3/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type3/14.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type3/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type3/15.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type3/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type3/16.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type3/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type3/17.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type4/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type4/18.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type4/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type4/21.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type4/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type4/22.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type4/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type4/23.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type4/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type4/24.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type5/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type5/25.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type5/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type5/26.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type5/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type5/27.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type5/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type5/28.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type6/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type6/20.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type6/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type6/22.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type6/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type6/23.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type6/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type6/3.png -------------------------------------------------------------------------------- /demo/src/main/assets/stickers/type6/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siwangqishiq/ImageEditor-Android/9dced4f26857f486871aab987020dbc010e932ff/demo/src/main/assets/stickers/type6/7.png -------------------------------------------------------------------------------- /demo/src/main/java/com/xinlan/imageeditandroid/FileUtils.java: -------------------------------------------------------------------------------- 1 | package com.xinlan.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 | * @author panyi 18 | * 19 | */ 20 | public class FileUtils { 21 | public static final String FOLDER_NAME = "xinlanedit"; 22 | 23 | /** 24 | * 获取存贮文件的文件夹路径 25 | * 26 | * @return 27 | */ 28 | public static File createFolders() { 29 | File baseDir; 30 | if (android.os.Build.VERSION.SDK_INT < 8) { 31 | baseDir = Environment.getExternalStorageDirectory(); 32 | } else { 33 | baseDir = Environment 34 | .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); 35 | } 36 | if (baseDir == null) 37 | return Environment.getExternalStorageDirectory(); 38 | File aviaryFolder = new File(baseDir, FOLDER_NAME); 39 | if (aviaryFolder.exists()) 40 | return aviaryFolder; 41 | if (aviaryFolder.isFile()) 42 | aviaryFolder.delete(); 43 | if (aviaryFolder.mkdirs()) 44 | return aviaryFolder; 45 | return Environment.getExternalStorageDirectory(); 46 | } 47 | 48 | public static File genEditFile(){ 49 | return FileUtils.getEmptyFile("tietu" 50 | + System.currentTimeMillis() + ".png"); 51 | } 52 | 53 | public static File getEmptyFile(String name) { 54 | File folder = FileUtils.createFolders(); 55 | if (folder != null) { 56 | if (folder.exists()) { 57 | File file = new File(folder, name); 58 | return file; 59 | } 60 | } 61 | return null; 62 | } 63 | 64 | /** 65 | * 删除指定文件 66 | * 67 | * @param path 68 | * @return 69 | */ 70 | public static boolean deleteFileNoThrow(String path) { 71 | File file; 72 | try { 73 | file = new File(path); 74 | } catch (NullPointerException e) { 75 | return false; 76 | } 77 | 78 | if (file.exists()) { 79 | return file.delete(); 80 | } 81 | return false; 82 | } 83 | 84 | /** 85 | * 保存图片 86 | * 87 | * @param bitName 88 | * @param mBitmap 89 | */ 90 | public static String saveBitmap(String bitName, Bitmap mBitmap) { 91 | File baseFolder = createFolders(); 92 | File f = new File(baseFolder.getAbsolutePath(), bitName); 93 | FileOutputStream fOut = null; 94 | try { 95 | f.createNewFile(); 96 | fOut = new FileOutputStream(f); 97 | } catch (IOException e) { 98 | e.printStackTrace(); 99 | } 100 | mBitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut); 101 | try { 102 | fOut.flush(); 103 | fOut.close(); 104 | } catch (IOException e) { 105 | e.printStackTrace(); 106 | } 107 | return f.getAbsolutePath(); 108 | } 109 | 110 | // 获取文件夹大小 111 | public static long getFolderSize(File file) throws Exception { 112 | long size = 0; 113 | try { 114 | File[] fileList = file.listFiles(); 115 | for (int i = 0; i < fileList.length; i++) { // 如果下面还有文件 116 | if (fileList[i].isDirectory()) { 117 | size = size + getFolderSize(fileList[i]); 118 | } else { 119 | size = size + fileList[i].length(); 120 | } 121 | } 122 | } catch (Exception e) { 123 | e.printStackTrace(); 124 | } 125 | return size; 126 | } 127 | 128 | /** * 格式化单位 * * @param size * @return */ 129 | public static String getFormatSize(double size) { 130 | double kiloByte = size / 1024d; 131 | int megaByte = (int) (kiloByte / 1024d); 132 | return megaByte + "MB"; 133 | } 134 | 135 | /** 136 | * 137 | * @Description: 138 | * @Author 11120500 139 | * @Date 2013-4-25 140 | */ 141 | public static boolean isConnect(Context context) { 142 | try { 143 | ConnectivityManager connectivity = (ConnectivityManager) context 144 | .getSystemService(Context.CONNECTIVITY_SERVICE); 145 | if (connectivity != null) { 146 | NetworkInfo info = connectivity.getActiveNetworkInfo(); 147 | if (info != null && info.isConnected()) { 148 | if (info.getState() == NetworkInfo.State.CONNECTED) { 149 | return true; 150 | } 151 | } 152 | } 153 | } catch (Exception e) { 154 | 155 | } 156 | return false; 157 | } 158 | }// end 159 | -------------------------------------------------------------------------------- /demo/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 9 | 10 | 16 | 17 |