├── image ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── image_ic_ok.png │ │ │ │ ├── image_ic_adjust.png │ │ │ │ ├── image_ic_cancel.png │ │ │ │ ├── image_ic_clip.png │ │ │ │ ├── image_ic_delete.png │ │ │ │ ├── image_ic_doodle.png │ │ │ │ ├── image_ic_mosaic.png │ │ │ │ ├── image_ic_rotate.png │ │ │ │ ├── image_ic_text.png │ │ │ │ ├── image_ic_undo.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── image_ic_ok_pressed.png │ │ │ │ ├── image_ic_clip_checked.png │ │ │ │ ├── image_ic_text_checked.png │ │ │ │ ├── image_ic_undo_disable.png │ │ │ │ ├── image_ic_cancel_pressed.png │ │ │ │ ├── image_ic_doodle_checked.png │ │ │ │ ├── image_ic_mosaic_checked.png │ │ │ │ └── image_ic_rotate_pressed.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── image_ic_ok.png │ │ │ │ ├── image_ic_clip.png │ │ │ │ ├── image_ic_text.png │ │ │ │ ├── image_ic_undo.png │ │ │ │ ├── image_ic_adjust.png │ │ │ │ ├── image_ic_cancel.png │ │ │ │ ├── image_ic_delete.png │ │ │ │ ├── image_ic_doodle.png │ │ │ │ ├── image_ic_mosaic.png │ │ │ │ ├── image_ic_rotate.png │ │ │ │ ├── image_ic_ok_pressed.png │ │ │ │ ├── image_ic_clip_checked.png │ │ │ │ ├── image_ic_text_checked.png │ │ │ │ ├── image_ic_undo_disable.png │ │ │ │ ├── image_ic_cancel_pressed.png │ │ │ │ ├── image_ic_doodle_checked.png │ │ │ │ ├── image_ic_mosaic_checked.png │ │ │ │ └── image_ic_rotate_pressed.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── image_ic_clip.png │ │ │ │ ├── image_ic_ok.png │ │ │ │ ├── image_ic_text.png │ │ │ │ ├── image_ic_undo.png │ │ │ │ ├── image_ic_adjust.png │ │ │ │ ├── image_ic_cancel.png │ │ │ │ ├── image_ic_delete.png │ │ │ │ ├── image_ic_doodle.png │ │ │ │ ├── image_ic_mosaic.png │ │ │ │ ├── image_ic_rotate.png │ │ │ │ ├── image_ic_ok_pressed.png │ │ │ │ ├── image_ic_cancel_pressed.png │ │ │ │ ├── image_ic_clip_checked.png │ │ │ │ ├── image_ic_doodle_checked.png │ │ │ │ ├── image_ic_mosaic_checked.png │ │ │ │ ├── image_ic_rotate_pressed.png │ │ │ │ ├── image_ic_text_checked.png │ │ │ │ └── image_ic_undo_disable.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── image_dimens.xml │ │ │ │ ├── image_attrs.xml │ │ │ │ ├── image_colors.xml │ │ │ │ ├── image_strings.xml │ │ │ │ └── image_styles.xml │ │ │ ├── drawable │ │ │ │ ├── image_bg_bottom.xml │ │ │ │ ├── image_bg_top.xml │ │ │ │ ├── image_btn_ok.xml │ │ │ │ ├── image_btn_undo.xml │ │ │ │ ├── image_btn_cancel.xml │ │ │ │ ├── image_btn_rotate.xml │ │ │ │ ├── image_btn_clip.xml │ │ │ │ ├── image_btn_text.xml │ │ │ │ ├── image_btn_doodle.xml │ │ │ │ └── image_btn_mosaic.xml │ │ │ ├── anim │ │ │ │ ├── image_fade_in.xml │ │ │ │ ├── image_fade_out.xml │ │ │ │ ├── image_dialog_exit.xml │ │ │ │ └── image_dialog_enter.xml │ │ │ ├── menu │ │ │ │ └── image_menu_gallery.xml │ │ │ ├── color │ │ │ │ └── image_color_text.xml │ │ │ └── layout │ │ │ │ ├── image_layout_gallery_pop.xml │ │ │ │ ├── image_edit_activity.xml │ │ │ │ ├── image_layout_image.xml │ │ │ │ ├── image_inc_gallery_request_permission.xml │ │ │ │ ├── image_layout_gallery_menu_item.xml │ │ │ │ ├── image_text_dialog.xml │ │ │ │ ├── image_color_layout.xml │ │ │ │ ├── image_gallery_activity.xml │ │ │ │ ├── image_edit_clip_layout.xml │ │ │ │ └── image_edit_opt_layout.xml │ │ ├── java │ │ │ └── me │ │ │ │ └── minetsh │ │ │ │ └── imaging │ │ │ │ ├── core │ │ │ │ ├── IMGMode.java │ │ │ │ ├── sticker │ │ │ │ │ ├── IMGStickerTouchHelper.java │ │ │ │ │ ├── IMGSticker.java │ │ │ │ │ ├── IMGStickerPortrait.java │ │ │ │ │ ├── IMGStickerMoveHelper.java │ │ │ │ │ ├── IMGStickerHelper.java │ │ │ │ │ ├── IMGStickerAdjustHelper.java │ │ │ │ │ └── IMGStickerX.java │ │ │ │ ├── file │ │ │ │ │ ├── IMGDecoder.java │ │ │ │ │ ├── IMGFileDecoder.java │ │ │ │ │ └── IMGAssetFileDecoder.java │ │ │ │ ├── IMGViewPortrait.java │ │ │ │ ├── elastic │ │ │ │ │ ├── IMGPointFEvaluator.java │ │ │ │ │ ├── IMGElasticAnimator.java │ │ │ │ │ ├── IMGRectFEvaluator.java │ │ │ │ │ └── IMGElastic.java │ │ │ │ ├── util │ │ │ │ │ └── IMGPermissionUtils.java │ │ │ │ ├── homing │ │ │ │ │ ├── IMGHomingEvaluator.java │ │ │ │ │ └── IMGHoming.java │ │ │ │ ├── IMGText.java │ │ │ │ ├── anim │ │ │ │ │ └── IMGHomingAnimator.java │ │ │ │ ├── IMGPath.java │ │ │ │ └── clip │ │ │ │ │ ├── IMGClip.java │ │ │ │ │ └── IMGClipWindow.java │ │ │ │ ├── widget │ │ │ │ ├── IMGViewHolderCallback.java │ │ │ │ └── IMGGalleryHolderCallback.java │ │ │ │ ├── IMG.java │ │ │ │ ├── view │ │ │ │ ├── IMGStickerContainer.java │ │ │ │ ├── IMGStickerImageView.java │ │ │ │ ├── IMGColorGroup.java │ │ │ │ ├── IMGStickerXText.java │ │ │ │ ├── IMGStickerTextView.java │ │ │ │ ├── IMGColorRadio.java │ │ │ │ └── IMGStickerView.java │ │ │ │ ├── gallery │ │ │ │ ├── model │ │ │ │ │ ├── IMGImageViewModel.java │ │ │ │ │ ├── IMGImageInfo.java │ │ │ │ │ └── IMGChooseMode.java │ │ │ │ ├── IMGScanTask.java │ │ │ │ ├── IMGScanner.java │ │ │ │ └── IMGGalleryMenuWindow.java │ │ │ │ ├── IMGTextEditDialog.java │ │ │ │ ├── IMGEditActivity.java │ │ │ │ └── IMGEditBaseActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── me │ │ │ └── minetsh │ │ │ └── imaging │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── me │ │ └── minetsh │ │ └── imaging │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── sample ├── .gitignore ├── src │ ├── main │ │ ├── assets │ │ │ ├── am.jpg │ │ │ └── g.jpeg │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── sample_album.png │ │ │ │ ├── sample_edited.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── drawable │ │ │ │ ├── shape_image.xml │ │ │ │ ├── fg_image.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── values-zh │ │ │ │ └── strings.xml │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ ├── layout_image.xml │ │ │ │ ├── activity_image_edit_sample.xml │ │ │ │ ├── activity_main.xml │ │ │ │ └── activity_gallery_sample.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── me │ │ │ │ └── minetsh │ │ │ │ └── imaging │ │ │ │ └── sample │ │ │ │ ├── CustomGalleryActivity.kt │ │ │ │ ├── MainApplication.kt │ │ │ │ ├── MainActivity.kt │ │ │ │ ├── ImageEditSampleActivity.kt │ │ │ │ └── GallerySampleActivity.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── me │ │ │ └── minetsh │ │ │ └── imaging │ │ │ └── sample │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── me │ │ └── minetsh │ │ └── imaging │ │ └── sample │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── screenshot ├── pv.webp ├── summary.png └── wechat.jpeg ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── caches │ └── build_file_checksums.ser ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml └── misc.xml ├── .gitignore ├── gradle.properties ├── README.md ├── gradlew.bat └── gradlew /image/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /sample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':sample', ':image' 2 | -------------------------------------------------------------------------------- /screenshot/pv.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/screenshot/pv.webp -------------------------------------------------------------------------------- /screenshot/summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/screenshot/summary.png -------------------------------------------------------------------------------- /screenshot/wechat.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/screenshot/wechat.jpeg -------------------------------------------------------------------------------- /sample/src/main/assets/am.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/assets/am.jpg -------------------------------------------------------------------------------- /sample/src/main/assets/g.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/assets/g.jpeg -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_ok.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_ok.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_adjust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_adjust.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_cancel.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_clip.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_delete.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_doodle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_doodle.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_mosaic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_mosaic.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_rotate.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_text.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_undo.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_clip.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_text.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_undo.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_clip.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_ok.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_text.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_undo.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/sample_album.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-xhdpi/sample_album.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/sample_edited.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-xhdpi/sample_edited.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_adjust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_adjust.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_cancel.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_delete.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_doodle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_doodle.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_mosaic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_mosaic.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_rotate.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_adjust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_adjust.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_cancel.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_delete.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_doodle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_doodle.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_mosaic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_mosaic.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_rotate.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_ok_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_ok_pressed.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_ok_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_ok_pressed.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_clip_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_clip_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_text_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_text_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_undo_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_undo_disable.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_clip_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_clip_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_text_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_text_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_undo_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_undo_disable.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_ok_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_ok_pressed.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_cancel_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_cancel_pressed.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_doodle_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_doodle_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_mosaic_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_mosaic_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xhdpi/image_ic_rotate_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xhdpi/image_ic_rotate_pressed.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_cancel_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_cancel_pressed.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_doodle_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_doodle_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_mosaic_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_mosaic_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxhdpi/image_ic_rotate_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxhdpi/image_ic_rotate_pressed.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_cancel_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_cancel_pressed.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_clip_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_clip_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_doodle_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_doodle_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_mosaic_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_mosaic_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_rotate_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_rotate_pressed.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_text_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_text_checked.png -------------------------------------------------------------------------------- /image/src/main/res/mipmap-xxxhdpi/image_ic_undo_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minetsh/Imaging/HEAD/image/src/main/res/mipmap-xxxhdpi/image_ic_undo_disable.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable/shape_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sample/src/main/res/values-zh/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 选择图片 5 | 9 6 | 多选 7 | 8 | -------------------------------------------------------------------------------- /sample/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/core/IMGMode.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.core; 2 | 3 | /** 4 | * Created by felix on 2017/11/22 下午6:18. 5 | */ 6 | 7 | public enum IMGMode { 8 | 9 | NONE, 10 | DOODLE, 11 | MOSAIC, 12 | CLIP 13 | 14 | } 15 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/core/sticker/IMGStickerTouchHelper.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.core.sticker; 2 | 3 | /** 4 | * Created by felix on 2017/12/5 下午12:25. 5 | */ 6 | 7 | public class IMGStickerTouchHelper { 8 | 9 | // TODO 10 | 11 | } 12 | -------------------------------------------------------------------------------- /image/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 开启存储权限 5 | 6 | 相册功能需要使用到存储权限,请在设置中开启此应用的存储权限 7 | 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Nov 14 11:14:25 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip 7 | -------------------------------------------------------------------------------- /image/src/main/res/values/image_dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 28dp 5 | 6 | 6dp 7 | 8 | 32dp 9 | 10 | -------------------------------------------------------------------------------- /image/src/main/res/drawable/image_bg_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /image/src/main/res/drawable/image_bg_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /image/src/main/res/drawable/image_btn_ok.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/core/sticker/IMGSticker.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.core.sticker; 2 | 3 | import me.minetsh.imaging.core.IMGViewPortrait; 4 | 5 | /** 6 | * Created by felix on 2017/11/14 下午7:31. 7 | */ 8 | 9 | public interface IMGSticker extends IMGStickerPortrait, IMGViewPortrait { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /image/src/main/res/drawable/image_btn_undo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /image/src/main/res/drawable/image_btn_cancel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /image/src/main/res/drawable/image_btn_rotate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable/fg_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /image/src/main/res/anim/image_fade_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /image/src/main/res/anim/image_fade_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/widget/IMGViewHolderCallback.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.widget; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | 5 | /** 6 | * Created by felix on 2018/1/4 下午3:52. 7 | */ 8 | 9 | public interface IMGViewHolderCallback { 10 | 11 | void onViewHolderClick(RecyclerView.ViewHolder holder); 12 | } 13 | -------------------------------------------------------------------------------- /sample/src/main/java/me/minetsh/imaging/sample/CustomGalleryActivity.kt: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.sample 2 | 3 | import me.minetsh.imaging.IMGGalleryActivity 4 | 5 | /** 6 | * Created by felix on 2018/1/5 下午1:25. 7 | */ 8 | 9 | class CustomGalleryActivity : IMGGalleryActivity() { 10 | 11 | // 使用时可不必继承,直接在AndroidManifest 中添加IMGGalleryActivity 并修改其主题即可 12 | 13 | } -------------------------------------------------------------------------------- /image/src/main/res/menu/image_menu_gallery.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/widget/IMGGalleryHolderCallback.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.widget; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | 5 | /** 6 | * Created by felix on 2018/1/4 下午3:53. 7 | */ 8 | 9 | public interface IMGGalleryHolderCallback extends IMGViewHolderCallback { 10 | 11 | void onCheckClick(RecyclerView.ViewHolder holder); 12 | } 13 | -------------------------------------------------------------------------------- /image/src/main/res/color/image_color_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /image/src/main/res/drawable/image_btn_clip.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /image/src/main/res/drawable/image_btn_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /image/src/main/res/drawable/image_btn_doodle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /image/src/main/res/drawable/image_btn_mosaic.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sample/src/main/java/me/minetsh/imaging/sample/MainApplication.kt: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.sample 2 | 3 | import android.app.Application 4 | import com.facebook.drawee.backends.pipeline.Fresco 5 | 6 | /** 7 | * Created by felix on 2018/1/5 下午12:34. 8 | */ 9 | 10 | class MainApplication : Application() { 11 | 12 | override fun onCreate() { 13 | super.onCreate() 14 | Fresco.initialize(applicationContext) 15 | } 16 | } -------------------------------------------------------------------------------- /sample/src/test/java/me/minetsh/imaging/sample/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.sample 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /image/src/main/res/anim/image_dialog_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /image/src/main/res/anim/image_dialog_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /image/src/test/java/me/minetsh/imaging/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Imaging 4 | 编辑 5 | 单选 6 | 选择图片 7 | 9 8 | 多选 9 | 10 | 图片编辑 11 | 相册 12 | 自定义相册 13 | 14 | 15 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/IMG.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging; 2 | 3 | import android.content.Context; 4 | 5 | /** 6 | * Created by felix on 2017/12/26 下午1:34. 7 | */ 8 | 9 | public class IMG { 10 | 11 | private static Context mApplicationContext; 12 | 13 | public static void initialize(Context context) { 14 | mApplicationContext = context.getApplicationContext(); 15 | 16 | } 17 | 18 | public static class Config { 19 | 20 | private boolean isSave; 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /image/src/main/res/values/image_attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /image/src/main/res/values/image_colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #FFFFFF 5 | #4CA1FB 6 | 7 | #FFFFFF 8 | #2B2B2B 9 | #FF5151 10 | #20FFCD 11 | #FFCC00 12 | #0078FF 13 | 14 | -------------------------------------------------------------------------------- /sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/layout_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /image/src/main/res/values/image_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 涂鸦 4 | 文字 5 | 马赛克 6 | 裁剪 7 | 还原 8 | 完成 9 | 取消 10 | 旋转 11 | 12 | 请直接在图片上涂抹虚化 13 | 撤销 14 | 所有照片 15 | 原图 16 | 预览 17 | 18 | -------------------------------------------------------------------------------- /image/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/core/file/IMGDecoder.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.core.file; 2 | 3 | import android.graphics.Bitmap; 4 | import android.graphics.BitmapFactory; 5 | import android.net.Uri; 6 | 7 | /** 8 | * Created by felix on 2017/12/26 下午2:54. 9 | */ 10 | 11 | public abstract class IMGDecoder { 12 | 13 | private Uri uri; 14 | 15 | public IMGDecoder(Uri uri) { 16 | this.uri = uri; 17 | } 18 | 19 | public Uri getUri() { 20 | return uri; 21 | } 22 | 23 | public void setUri(Uri uri) { 24 | this.uri = uri; 25 | } 26 | 27 | public Bitmap decode() { 28 | return decode(null); 29 | } 30 | 31 | public abstract Bitmap decode(BitmapFactory.Options options); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /sample/src/androidTest/java/me/minetsh/imaging/sample/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.sample 2 | 3 | import androidx.test.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | import org.junit.Assert.assertEquals 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | /** 10 | * Instrumented test, which will execute on an Android device. 11 | * 12 | * See [testing documentation](http://d.android.com/tools/testing). 13 | */ 14 | @RunWith(AndroidJUnit4::class) 15 | class ExampleInstrumentedTest { 16 | @Test 17 | fun useAppContext() { 18 | // Context of the app under test. 19 | val appContext = InstrumentationRegistry.getTargetContext() 20 | assertEquals("me.minetsh.imaging.sample", appContext.packageName) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/core/IMGViewPortrait.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.core; 2 | 3 | /** 4 | * Created by felix on 2017/11/16 下午5:49. 5 | */ 6 | 7 | public interface IMGViewPortrait { 8 | 9 | int getWidth(); 10 | 11 | int getHeight(); 12 | 13 | float getScaleX(); 14 | 15 | float getScaleY(); 16 | 17 | float getRotation(); 18 | 19 | float getPivotX(); 20 | 21 | float getPivotY(); 22 | 23 | float getX(); 24 | 25 | float getY(); 26 | 27 | void setX(float x); 28 | 29 | void setY(float y); 30 | 31 | void setRotation(float rotate); 32 | 33 | void setScaleX(float scaleX); 34 | 35 | void setScaleY(float scaleY); 36 | 37 | float getScale(); 38 | 39 | void setScale(float scale); 40 | 41 | void addScale(float scale); 42 | } 43 | -------------------------------------------------------------------------------- /image/src/main/res/layout/image_layout_gallery_pop.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 18 | 19 | -------------------------------------------------------------------------------- /image/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the setSize of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /sample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the setSize of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 | 21 | -------------------------------------------------------------------------------- /image/src/androidTest/java/me/minetsh/imaging/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.InstrumentationRegistry; 6 | import androidx.test.runner.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.assertEquals; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() throws Exception { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getTargetContext(); 24 | 25 | assertEquals("me.minetsh.imaging.test", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /image/src/main/res/layout/image_edit_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8 13 | org.gradle.parallel=true 14 | org.gradle.configureondemand=true 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | android.useAndroidX=true 20 | android.enableJetifier=true 21 | android.injected.testOnly=false 22 | -------------------------------------------------------------------------------- /sample/src/main/java/me/minetsh/imaging/sample/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.sample 2 | 3 | import android.content.Intent 4 | import android.os.Bundle 5 | import androidx.appcompat.app.AppCompatActivity 6 | import kotlinx.android.synthetic.main.activity_main.* 7 | 8 | const val REQ_IMAGE_EDIT = 1 9 | 10 | const val REQ_IMAGE_CHOOSE = 2 11 | 12 | class MainActivity : AppCompatActivity() { 13 | 14 | override fun onCreate(savedInstanceState: Bundle?) { 15 | super.onCreate(savedInstanceState) 16 | setContentView(R.layout.activity_main) 17 | 18 | sdv_image_edit.setOnClickListener { 19 | startActivity(Intent( 20 | this, ImageEditSampleActivity::class.java 21 | )) 22 | } 23 | 24 | sdv_image_album.setOnClickListener { 25 | startActivity(Intent( 26 | this, GallerySampleActivity::class.java 27 | )) 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/core/elastic/IMGPointFEvaluator.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.core.elastic; 2 | 3 | import android.animation.TypeEvaluator; 4 | import android.graphics.PointF; 5 | 6 | /** 7 | * Created by felix on 2017/11/27 下午6:27. 8 | */ 9 | 10 | public class IMGPointFEvaluator implements TypeEvaluator { 11 | 12 | private PointF mPoint; 13 | 14 | public IMGPointFEvaluator() { 15 | 16 | } 17 | 18 | public IMGPointFEvaluator(PointF reuse) { 19 | mPoint = reuse; 20 | } 21 | 22 | @Override 23 | public PointF evaluate(float fraction, PointF startValue, PointF endValue) { 24 | float x = startValue.x + (fraction * (endValue.x - startValue.x)); 25 | float y = startValue.y + (fraction * (endValue.y - startValue.y)); 26 | 27 | if (mPoint != null) { 28 | mPoint.set(x, y); 29 | return mPoint; 30 | } else { 31 | return new PointF(x, y); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /image/src/main/res/layout/image_layout_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 24 | 25 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/core/file/IMGFileDecoder.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.core.file; 2 | 3 | import android.graphics.Bitmap; 4 | import android.graphics.BitmapFactory; 5 | import android.net.Uri; 6 | import android.text.TextUtils; 7 | 8 | import java.io.File; 9 | 10 | /** 11 | * Created by felix on 2017/12/26 下午3:07. 12 | */ 13 | 14 | public class IMGFileDecoder extends IMGDecoder { 15 | 16 | public IMGFileDecoder(Uri uri) { 17 | super(uri); 18 | } 19 | 20 | @Override 21 | public Bitmap decode(BitmapFactory.Options options) { 22 | Uri uri = getUri(); 23 | if (uri == null) { 24 | return null; 25 | } 26 | 27 | String path = uri.getPath(); 28 | if (TextUtils.isEmpty(path)) { 29 | return null; 30 | } 31 | 32 | File file = new File(path); 33 | if (file.exists()) { 34 | return BitmapFactory.decodeFile(path, options); 35 | } 36 | 37 | return null; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/core/sticker/IMGStickerPortrait.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.core.sticker; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.RectF; 5 | import android.view.View; 6 | 7 | /** 8 | * Created by felix on 2017/11/16 下午5:54. 9 | */ 10 | 11 | public interface IMGStickerPortrait { 12 | 13 | boolean show(); 14 | 15 | boolean remove(); 16 | 17 | boolean dismiss(); 18 | 19 | boolean isShowing(); 20 | 21 | RectF getFrame(); 22 | 23 | // RectF getAdjustFrame(); 24 | // 25 | // RectF getDeleteFrame(); 26 | 27 | void onSticker(Canvas canvas); 28 | 29 | void registerCallback(IMGSticker.Callback callback); 30 | 31 | void unregisterCallback(IMGSticker.Callback callback); 32 | 33 | interface Callback { 34 | 35 | void onDismiss(V stickerView); 36 | 37 | void onShowing(V stickerView); 38 | 39 | boolean onRemove(V stickerView); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /image/src/main/java/me/minetsh/imaging/view/IMGStickerContainer.java: -------------------------------------------------------------------------------- 1 | package me.minetsh.imaging.view; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | /** 8 | * Created by felix on 2017/12/21 下午2:28. 9 | */ 10 | 11 | public class IMGStickerContainer extends ViewGroup { 12 | 13 | public IMGStickerContainer(Context context) { 14 | super(context); 15 | } 16 | 17 | @Override 18 | protected void onLayout(boolean changed, int l, int t, int r, int b) { 19 | if (getChildCount() == 1) { 20 | View child = getChildAt(0); 21 | if (child != null) { 22 | child.layout( 23 | (l + r) >> 1 - (child.getMeasuredWidth() >> 1), 24 | (t + b) >> 1 - (child.getMeasuredHeight() >> 1), 25 | (l + r) >> 1 + (child.getMeasuredWidth() >> 1), 26 | (t + b) >> 1 + (child.getMeasuredHeight() >> 1) 27 | ); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /image/src/main/res/layout/image_inc_gallery_request_permission.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 17 | 18 |