1. Products
  2.   Image
  3.   Java
  4.   PhotoEditor
 
  

Edit & Manipulate Images via Free Java Library

Open Source Java Photo Editing and Manipulation Library that enable Software Developers to Draw on Images, Apply Filter Effect on Images, Adding/Editing Text, Adding Emoji, and So On.

What is PhotoEditor?

Photo Editor SDK for Java provides software developers with a remarkably stable and intuitive library for comprehensive image editing and manipulation. By integrating this open-source photo editor library, programmers can execute sophisticated visual edits using just a few lines of Java code. The library grants developers complete, granular control, enabling them to fine-tune brush properties like color, size, and opacity, manage fonts and text overlays, and seamlessly insert custom images and stickers. This level of precision simplifies complex workflows, making it an ideal Java image editing SDK for applications requiring robust, user-directed photo modifications.

Available under the permissive MIT License, this free Java photo editor is packed with professional-grade features. Core functionalities include drawing on an image, applying a wide range of filter effects, and adding or editing text on images with support for custom fonts and emojis. For dynamic composition, users can scale images, rotate the image view, and manage elements with undo and redo for brush commands. The library's straightforward API for tasks like deleting views and rotating images empowers developers to build powerful, desktop-grade or mobile photo editing applications quickly and efficiently, accelerating project timelines without sacrificing creative control.

Previous Next

Getting Started with PhotoEditor

The easiest and recommended way to install PhotoEditor is via GitHub. Please use the following command for an easy and smooth installation.

Install PhotoEditor via GitHub

go get -u https://github.com/burhanrashid52/PhotoEditor.git 

Creating New Images via Java

The open source PhotoEditor library has included several important functionalizes related to drawing on images using Java commands. You can customize the brushes and paint with a different set of properties. Please remember that you need to enable the drawing mode before starting the drawing on the image. Moreover, setting any property of a brush for the drawing will also automatically enable the drawing mode.

How Save Image as A Bitmap via Java API?


    mPhotoEditor.saveAsBitmap(new PhotoEditor.OnSaveBitmap() {
                    @Override
                    public void onBitmapReady(@NonNull Bitmap saveBitmap) {
                        Log.e("PhotoEditor","Image Saved Successfully");
                    }

                    @Override
                    public void onFailure(@NonNull Exception exception) {
                        Log.e("PhotoEditor","Failed to save Image");
                    }
                });

Applying Custom Filters on Image

The PhotoEditor library enables software developers to apply filters on their source images inside their Java apps. The library has included both inbuilt as well as custom filter facilities. By default, you can use some commonly available filters with just a one-liner code. You can also build your own custom filters and apply them with ease. Please note that some effects may not be available on all platforms, so please check before creating a certain effect.

How to Apply Custom Filters via Java?


    CustomEffect customEffect = new CustomEffect.Builder(EffectFactory.EFFECT_BRIGHTNESS)
                    .setParameter("brightness", 0.5f)
                    .build();
    mPhotoEditor.setFilterEffect(customEffect);

Working with Image Text

The free PhotoEditor library has included several important features for managing text inside the images using the Java library. You can easily insert text and apply color to the text using a couple of lines of Java code. By default, the library will use the fonts provided in the builder but you can use different fonts with ease. You can also edit the existing available text. The library has also included support for adding Emojis with ease.

How to Add or Edit Text via Java API?


    // For adding text, please use the following command
    mPhotoEditor.addText(inputText, colorCode);

    //How to Edit Text
    mPhotoEditor.setOnPhotoEditorListener(new OnPhotoEditorListener() {
            @Override
            public void onEditTextChangeListener(View rootView, String text, int colorCode) {
                
            }
        });
 English