PhotoEditor is a free, open source photo & video editors project written in Kotlin and released under MIT. It has 4,509 GitHub stars, 1,049 forks and 57 open issues, and was last pushed 35 hours ago. On this registry it ranks #18 of 22 tracked projects in Photo & Video Editors, with 5 head-to-head comparisons available.

What is PhotoEditor?

PhotoEditor is an open-source Kotlin library for Android that adds paint, text, filter, emoji, and sticker editing directly inside an app's own image workflow, and it is aimed at Android developers who need story-style or social editing features without building that stack themselves.

What it is

PhotoEditor is an Android library distributed as com.burhanrashid52:photoeditor, with the current release at version 3.1.1 and a minimum supported API level of 21. It is written in Kotlin, released under the MIT licence, and published to mavenCentral(). The project lives in the Android ecosystem as a view-level editing component: an application places PhotoEditorView in its XML layout, supplies an image through app:photo_src or programmatically through mPhotoEditorView.source, and then builds a PhotoEditor instance from a Context and that view.

The concrete problem it solves is the editing layer itself. Without it, an Android developer has to write drawing, gesture handling, undo and redo history, text overlays, filter application, and sticker placement by hand on top of Canvas and ImageView, then keep all of it consistent across rotation, scaling, and deletion. PhotoEditor replaces that hand-rolled editing stack with a documented set of components, so the host application only has to load the source image, present the editor, and store the saved result.

Key capabilities

  • Drawing on the image with configurable brush color, size, opacity, erasing, and basic shapes.
  • Filter effects applied to the image through MediaEffect.
  • Adding and editing text with configurable color and custom fonts.
  • Adding emoji, including support for custom emoji fonts.
  • Adding images and stickers, with pinch-to-scale and rotate gestures on placed views.
  • Undo and redo history covering both brush strokes and placed views, plus deletion of individual views.
  • Saving the edited photo once work is complete, and declaring the source drawable or color through the app:photo_src attribute.

Who uses it and how

  • Android app teams that need an in-app editor for social or story-style posts, which is the use case the README and topics such as instagram, facebook, and stories point to.
  • Developers building chat, messaging, or profile-photo flows who want annotation and sticker tools without writing their own gesture and history handling.
  • Applications on AndroidX, which is the baseline from version 1.0.0 onward; projects still on the old support library can roll back to version 0.4.0.
  • Java codebases, which can use the 1.5.1 release, since the library migrated fully to Kotlin at version 2.0.0 with no breaking API changes between those versions.
  • Teams that need deep customisation, who can import the :photoeditor module from the sample project rather than consuming the published artifact.

Getting started

Add the dependency to the app module's Gradle file from mavenCentral(): implementation 'com.burhanrashid52:photoeditor:3.1.1', then declare PhotoEditorView in the layout and build a PhotoEditor from a Context and that view. The :photoeditor module can also be imported from the sample project when further customisation is required.

How it compares

This registry entry names no paid products that PhotoEditor replaces, and it also names no sibling libraries, so on the facts available it stands alone here. Its practical alternative is not another packaged editor but writing the equivalent drawing, filtering, overlay, and undo-and-redo code from scratch on Android's Canvas and ImageView.

When to use it — and when not to

There is no database, object storage, or SMTP service to operate, because PhotoEditor is a client-side Android library rather than a hosted product; the host app remains responsible for image loading through libraries such as Picasso or Glide, for file storage, and for persisting the saved output. It is the wrong choice for iOS, Flutter, React Native, or any non-Android target, and for projects that only need a static crop or resize, where a lighter dependency is enough. The project carries 57 open issues and its README delegates substantial detail to a FAQ section and linked images, so adopters should expect to read the sample project and issue tracker rather than relying on the README alone.

project readme (upstream, from github) — read inline

PhotoEditor

Github Action Downloads API JavaDoc Uplabs AndroidArsenal AndroidDevDigest AwesomeAndroid AndroidWeekly Mindorks

A Photo Editor library with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories.

Download link

PhotoEditor - Android SDK with simple, easy support for image editing. | Product Hunt

Buy Me A Coffee

Features

Benefits

  • Hassle free coding
  • Increase efficiency
  • Easy image editing

Getting Started

To start with this, we need to simply add the dependencies from mavenCentral() in the gradle file of our app module like this

implementation 'com.burhanrashid52:photoeditor:3.1.1'

or we can also import the :photoeditor module from sample for further customization

Migrations

AndroidX

PhotoEditor v.1.0.0 is a migration to androidX and dropping the support of older support library. There are no API changes. If you find any issue migrating to v.1.0.0 , please follow this Guide. If you still facing the issue than you can always rollback to v.0.4.0. Any fix in PR are Welcome :)

Kotlin

PhotoEditor v.2.0.0 is fully migrated to Kotlin. You can use v.1.5.1 for the Java version. There are no breaking API changes in these two versions.

Setting up the View

First we need to add PhotoEditorView in our xml layout

 <ja.burhanrashid52.photoeditor.PhotoEditorView
        android:id="@+id/photoEditorView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:photo_src="@drawable/got_s" />
  

We can define our drawable or color resource directly using app:photo_src

We can set the image programmatically by getting source from PhotoEditorView which will return a ImageView so that we can load image from resources,file or (Picasso/Glide)

mPhotoEditorView = findViewById(R.id.photoEditorView)

mPhotoEditorView.source.setImageResource(R.drawable.paris_tower)

Building a PhotoEditor

To use the image editing feature we need to build a PhotoEditor which requires a Context and PhotoEditorView which we have to setup in our xml layout

//Use custom font using latest support library
val mTextRobotoTf = ResourcesCompat.getFont(this, R.font.roboto_medium)
//loading font from asset
val mEmojiTypeFace = Typeface.createFromAsset(getAssets(), "emojione-android.ttf")

mPhotoEditor = PhotoEditor.Builder(this, mPhotoEditorView)
            .setPinchTextScalable(pinchTextScalable) // set flag to make text scalable when pinch
            .setDefaultTextTypeface(mTextRobotoTf)
            .setDefaultEmojiTypeface(mEmojiTypeFace)
            .build() // build photo editor sdk

We can customize the properties in the PhotoEditor as per our requirement

Property Usage
setPinchTextScalable() set false to disable pinch to zoom on text insertion. Default: true.
setClipSourceImage() set true to clip the drawing brush to the source image. Default: false.
setDefaultTextTypeface() set default text font to be added on image
setDefaultEmojiTypeface() set default font specifc to add emojis

That's it we are done with setting up our library

Drawing

We can customize our brush and paint with different set of property. To start drawing on image we need to enable the drawing mode

Type Method
Enable/Disable mPhotoEditor.setBrushDrawingMode(true);
Shape (brush, line, oval, rectangle, arrow) mPhotoEditor.addShape(shape)
Shape size (px) mPhotoEditor.setBrushSize(brushSize) or through the a ShapeBuilder
Shape opacity (In %) mPhotoEditor.setOpacity(opacity) or through the a ShapeBuilder
Shape color mPhotoEditor.setBrushColor(colorCode) or through the a ShapeBuilder
Brush Eraser mPhotoEditor.brushEraser()

Note: Whenever we set any property of a brush for drawing it will automatically enable the drawing mode

Shapes

We can draw shapes from v.1.5.0. We use ShapeBuilder to define shape and other properties.

val shapeBuilder = ShapeBuilder()
    .withShapeOpacity(100)
    .withShapeType(ShapeType.Oval)
    .withShapeSize(50f)

photoEditor.setShape(mShapeBuilder)

For more details check ShapeBuilder.

Filter Effect

We can apply inbuild filter to the source images using

mPhotoEditor.setFilterEffect(PhotoFilter.BRIGHTNESS)

We can also apply custom effect using Custom.Builder

For more details check Custom Filters

Text

Use addText with named optional parameters:

photoEditor.addText(
    text = inputText,
    colorCodeTextView = colorCode
)

It uses the default font from the builder unless you provide a typeface:

photoEditor.addText(
    text = inputText,
    textTypeface = mTypeface,
    colorCodeTextView = colorCode
)

To place text away from the default centre position, provide a Position:

photoEditor.addText(
    text = inputText,
    position = Position(80, 160),
    colorCodeTextView = colorCode
)

Java c

readme truncated — read the full docs on github

Frequently asked questions

Is PhotoEditor free to use?

PhotoEditor is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does PhotoEditor do?

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.

What is PhotoEditor written in?

PhotoEditor is primarily written in Kotlin. Its source is publicly available at https://github.com/burhanrashid52/PhotoEditor, and it has 4,509 GitHub stars.