An Android SDK/library for image editing, published to Maven Central. Provides a simple API for drawing, applying filters, adding text/emoji/stickers, and more.
photoeditor/- Core library module (published to Maven Central)app/- Sample/demo application
PhotoEditor/PhotoEditorImpl- Main API entry point (Builder pattern)PhotoEditorView- Custom RelativeLayout container for editingDrawingView- Custom canvas for brush/shape renderingGraphicManager- Manages added views (text, sticker, emoji) and undo/redo statePhotoEditorViewState- Central state holder with undo/redo stacksMultiTouchListener- Handles pinch, rotate, drag gestures
- Builder pattern:
PhotoEditor.Builder,ShapeBuilder,TextStyleBuilder,SaveSettings.Builder - Composite pattern:
Graphicinterface withText,Sticker,Emojiimplementations - Strategy pattern:
Shapeinterface withBrushShape,LineShape,OvalShape,RectangleShape - Listener pattern:
OnPhotoEditorListener,BrushViewChangeListener - Coroutines: Image saving uses
Dispatchers.IOwithSaveFileResultsealed class
# Build
./gradlew build
# Unit tests
./gradlew check
# Instrumentation tests (requires emulator)
./gradlew connectedCheck- Language: Kotlin 2.0.0
- Min SDK: API 21
- Build: Gradle 8.5.1 + Android Gradle Plugin 8.5.1
- Key deps: AndroidX, Kotlin Coroutines, Glide, Material Design
- Testing: JUnit 4, Robolectric, Mockito, Espresso
Create branches from master based on the issue number using the prefix PE-:
PE-<issue_number>-<short-description>
Examples:
PE-4-add-arrow-shapePE-5-fix-eraser-opacity
When asked to deploy, create a new tag with an incremented version following the existing v.X.Y.Z format:
- Patch (
Z): Bug fixes, small changes - Minor (
Y): New features, non-breaking changes - Major (
X): Breaking changes
The latest tag is v.3.1.0. The next tags would be:
- Patch:
v.3.1.1 - Minor:
v.3.2.0 - Major:
v.4.0.0
git tag v.X.Y.Z
git push origin v.X.Y.ZWhen releasing, also update CHANGELOG.md. Append a new section at the bottom of the file using the version number as the heading (### X.Y.Z). Each entry is prefixed with a category:
New :for new featuresFixed :for bug fixesChange :for modifications to existing behaviorDeprecated :for deprecated APIsRemoved :for removed featuresTest :for test additions/changes
Include issue numbers where applicable (e.g., #123). Example:
### 3.2.0
- New : Added circle shape support
- Fixed : #456 Undo not working after filter applied
- Change : (Breaking Change) Renamed `setFilter` to `applyFilter`When releasing, also create a GitHub release using gh release create. The release notes must follow this structure:
- What's Changed - List each merged PR with author attribution and PR link
- New Contributors - List first-time contributors with their first PR link
- Full Changelog - Auto-generated comparison link between the previous and new tag
Use the --generate-notes flag to auto-populate from merged PRs:
gh release create v.X.Y.Z --title "v.X.Y.Z" --generate-notesExample release notes:
## What's Changed
* Added circle shape support by @contributor1 in https://github.com/nickhallx/PhotoEditor/pull/10
* Fixed undo after filter by @contributor2 in https://github.com/nickhallx/PhotoEditor/pull/11
## New Contributors
* @contributor2 made their first contribution in https://github.com/nickhallx/PhotoEditor/pull/11
**Full Changelog**: https://github.com/nickhallx/PhotoEditor/compare/v.3.1.0...v.3.2.0- Maven Central via
scripts/publish-mavencentral.gradle - CI/CD via GitHub Actions (
.github/workflows/)