All Projects → imgly → Pesdk Android Demo

imgly / Pesdk Android Demo

Licence: other
A fully customizable photo editor for your app.

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Pesdk Android Demo

Pesdk Ios Examples
A fully customizable photo editor for your app.
Stars: ✭ 837 (+80.39%)
Mutual labels:  sdk, image-processing, text, filter
Imageviewer
HDR, PFM, DDS, KTX, EXR, PNG, JPG, BMP image viewer and manipulator
Stars: ✭ 71 (-84.7%)
Mutual labels:  image-processing, image-manipulation, filter
Sharp
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
Stars: ✭ 21,131 (+4454.09%)
Mutual labels:  image-processing, crop, overlay
Zlimageeditor
A powerful image editor framework. Supports graffiti, cropping, mosaic, text stickers, image stickers, filters.
Stars: ✭ 148 (-68.1%)
Mutual labels:  crop, image-editor, filter
Fmphotopicker
A modern, simple and zero-dependency photo picker with an elegant and customizable image editor
Stars: ✭ 428 (-7.76%)
Mutual labels:  crop, image-editor, filter
Metalpetal
A GPU accelerated image and video processing framework built on Metal.
Stars: ✭ 907 (+95.47%)
Mutual labels:  opengl, image-processing, filter
vesdk-android-demo
VideoEditor SDK: A fully customizable video editor for your app.
Stars: ✭ 90 (-80.6%)
Mutual labels:  text, filter, crop
Imgtoascii
A JavaScript implementation of a image to Ascii code
Stars: ✭ 331 (-28.66%)
Mutual labels:  image-processing, image-manipulation
Opence
Contrast Enhancement Techniques for low-light images
Stars: ✭ 333 (-28.23%)
Mutual labels:  image-processing, image-manipulation
Filter.js
Filter.js: Video and Image Processing and Computer Vision Library in pure JavaScript (Browser and Node.js)
Stars: ✭ 335 (-27.8%)
Mutual labels:  framework, image-processing
Photodemon
A free portable photo editor focused on pro-grade features, high performance, and maximum usability.
Stars: ✭ 356 (-23.28%)
Mutual labels:  image-processing, image-editor
Magick
Magic, madness, heaven, sin
Stars: ✭ 362 (-21.98%)
Mutual labels:  image-processing, image-manipulation
Texturize
🤖🖌️ Generate photo-realistic textures based on source images. Remix, remake, mashup! Useful if you want to create variations on a theme or elaborate on an existing texture.
Stars: ✭ 366 (-21.12%)
Mutual labels:  image-processing, image-manipulation
Korkut
Quick and simple image processing at the command line. 🔨
Stars: ✭ 310 (-33.19%)
Mutual labels:  image-processing, crop
Cloudinary angular
Cloudinary Angular client library
Stars: ✭ 305 (-34.27%)
Mutual labels:  sdk, image-manipulation
Android Ffmpeg Camerarecord
使用JavaCV提供的支持, 使用OpenGL实时处理+显示摄像头采集的图像, 并使用FFMPEG实时录制音视频
Stars: ✭ 334 (-28.02%)
Mutual labels:  opengl, filter
Pyvips
python binding for libvips using cffi
Stars: ✭ 296 (-36.21%)
Mutual labels:  image-processing, image-manipulation
Sensitive
敏感词查找,验证,过滤和替换 🤓 FindAll, Validate, Filter and Replace words.
Stars: ✭ 292 (-37.07%)
Mutual labels:  text, filter
Tui.image Editor
🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.
Stars: ✭ 4,761 (+926.08%)
Mutual labels:  image-editor, filter
Tocropviewcontroller
A view controller for iOS that allows users to crop portions of UIImage objects
Stars: ✭ 4,210 (+807.33%)
Mutual labels:  image-processing, crop

PhotoEditor SDK Logo

Maven Twitter

About PhotoEditor SDK for Android

Overview

The PhotoEditor SDK is a powerful and multifaceted tool which enables you to equip your Android application with high-performant photo editing capabilities. The PhotoEditor SDK is written in Java and can easily be customized to entirely blend with your CI and provide your users with the exact feature set your use-case requires.

The SDK ships with a large variety of filters, covering all state of the art style- and mood settings that can be previewed in real-time. Unlike other apps that allow a live preview of filters, the PhotoEditor SDK even provides a live preview when using high-resolution images.

All operations are non-destructive which allows for fast and uncomplicated revision of the creatives at any given time and creates an intuitive and creative workflow for your users. Please see Features for a detailed list of the photo editing tools included in the PhotoEditor SDK.

Get it on Google Play

License

The PhotoEditorSDK is a product of img.ly GmbH. Please make sure that you have a commercial license before releasing your app. A commercial license is required if you would like to integrate the SDK into any app, regardless of whether you monetize directly (paid app, subscription, service fee), indirectly (advertising, etc.) or are developing a free app. Every license for the PhotoEditor SDK is valid for one product only unless the products are closely related.

If you’d like to use the PhotoEditor SDK for a charitable project, you can do so free of charge. However, please contact us anyway, so we can evaluate whether you qualify for a non-commercial license or not and handle your request accordingly.

Please get in touch if you’d like to purchase a commercial license or require further information on our pricing and services. Please see the included LICENSE.md for licensing details.

Features

  • Over 60 handcrafted Filters covering all state of the art style- and mood settings to choose from.

  • Design custom filters in Photoshop and other apps: The API of the PhotoEditor SDK enables you to expand the filter library with your own set of custom filters to define a unique visual language. Custom filters can easily be created by anyone using LUTs (Lookup Tables) from popular apps like Photoshop, GIMP or Lightroom. Design your filter and apply it onto the provided identity image. That will 'record' the filter response, now simply save it and add it as a new filter. Done.

  • An Overlay Tool that can be used to create neat lighting effects like lens flare or bokeh but also to furnish pictures with textures like crumpled paper or plaster. You can easily expand the library by importing your own set of overlay assets.

  • An Adjustment section that holds both essential and advanced photo editing features like brightness, contrast, saturation, clarity etc. that help tweak and fine tune images to create stunning creatives.

  • A Transform section that unifies cropping, flipping and rotation in one feature.

  • The robust Text Feature provides all necessary functions for quickly adding text to any picture or creative. The corresponding font library can easily be exchanged, reduced, or expanded.

  • A categorized Sticker library whose UI is optimized for exploration and discovery. You can easily complement the library with your own custom sticker packages.

  • A Frame Tool that works with any given photo size or ratio.

  • A high performant Brush Engine optimized for touch screen that supports different brush strokes.

  • A Photo Roll equipped with a wide range of stock photography and templates with presorted categories. The API allows for easy expansion, reduction and rearrangement of the assets.

  • A clean and intuitive UI that ensures an unhindered flow of creativity and a seamless experience while composing creatives. The UI is designed to be customized to completely match your CI and blend with your app.

  • You can strip out every feature you deem unnecessary to provide your users with the exact feature set your use case requires.

  • Android API Level 16+ Covers nearly 99% of all Android devices with touchscreen.

  • Fast image export up to 4294 MegaPixel

  • Generic camera support for most Android phones.

  • Tablet support: The PhotoEditor SDK uses auto layout for its views and adapts to each screen size.

  • Non/destructive features and effects: Quickly revise, redo or even discard your work.

SDK Core

ACS Component
A generic Android Camera Stack library which is based on the android.hardware.Camera API. Supports front and rear cam, HDR, flash modes and much more.

SDK Component
The PhotoEditor core library for Android. Containing the OpenGL and toolkit implementation.

UI Component
The default UI components consisting of LivePreview and Editor Activity.

Dependencies

Two Google support libraries needed or used by the SDK.

  • com.android.support:recyclerview-v7
  • com.android.support:support-annotations

Documentation

For a detailed documentation, please take a look here.

Author

img.ly GmbH, @PhotoEditorSDK, www.photoeditorsdk.com

Installation

This SDK requires a minimum deployment target of Android API 15 (4.0.4) with OpenGl ES 2.0 supported Device but our official support is starting with API 16 (4.1.0)

Add your license file

Before using any components of the PhotoEditor SDK, you have to add your license file to your applications assets folder. The expected default name of the license file is "LICENSE". In order to change this, see licencePath option of PESDKConfig in your gradle file.

The license is digitally signed and can't be altered without becoming invalid. Our sample app comes with its own license, so you can try that right away. To try our SDK in your own app, you need to request a trial license that's bound to your bundle identifier. You can start a trial here and download your license file from your dashboard.

Once the license file has been added the application will validate its presence upon launch.

Setting up the workspace

Please ensure that our artifactory repository is listed in your repositories in the project’s build.gradle file:

// Add the PESDK repository and plugin dependency
buildscript {
    repositories {
        jcenter()
        google()
        maven { url "https://artifactory.img.ly/artifactory/imgly" }
    }
    dependencies {
        classpath 'ly.img.android.pesdk:plugin:8.1.0'
    }
}

You will have to add the pesdk plugin and PESDKConfig into your module's build.gradle file:

// Apply the Android Plugin
apply plugin: 'com.android.application'

// Apply the IMGLYPlugin
apply plugin: 'ly.img.android.sdk'

// Configure the PESDKPlugin
imglyConfig {

    // Optional: Enable the VideoEditor SDK
    vesdk {
        enabled true 
        licencePath 'vesdk_android_license.dms'
    }
    
    // Optional: Enable the PhotoEditor SDK
    pesdk {
        enabled true
        licencePath 'pesdk_android_license.dms'
    }

    // If you are using another supportLibVersion ('com.android.support') please change this version here our update your own supportLibVersion
    supportLibVersion "28.0.0"

    // Define the modules you are need
    modules {
        // Add all the UI modules you are need
        include 'ui:core'
        include 'ui:text'
        include 'ui:focus'
        include 'ui:frame'
        include 'ui:brush'
        include 'ui:filter'
        include 'ui:camera'
        include 'ui:sticker'
        include 'ui:overlay'
        include 'ui:transform'
        include 'ui:adjustment'

        // Add the serializer if you need
        include 'backend:serializer'

        // Add asset packs if you need
        include 'assets:font-basic'
        include 'assets:frame-basic'
        include 'assets:filter-basic'
        include 'assets:overlay-basic'
        include 'assets:sticker-shapes'
        include 'assets:sticker-emoticons'
    }
}

// Do your Android Configurations... ex.
android {
    /* Set the compile SDK and the Build SDK min. at SDK 29 or grater.
     * We can't provide support for Bugs, that are the result of older SDK versions.
     */
    compileSdkVersion 29
    buildToolsVersion '29.0.2'

    defaultConfig {
        /*
         * Replace with your App-ID and keep sure that it match with your license!
         * @see http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename
         */
        applicationId "my.domain.application"

        /* Set the minimum supported SDK Version to 16 (Android 4.1.0) or higher */
        minSdkVersion 16

        /* Set the target SDK Version at minimum to 29 or higher */
        targetSdkVersion 29

        /* Set your own Version Code and Version Name */
        versionCode 1
        versionName "1.0"
    }

    /* Set Java Language level to Java 1.8+ */
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

Sync your project with the Gradle files after every edit! For more information about Gradle, please take a look at the Android Developer Documentation

Android Permissions

The PhotoEditor SDK requires two permissions: The "Write access to external storage" and the "Camera" permission (if you include the Camera module). You can grant this permissions yourself otherwise the SDK will automatically grant these permissions

Please take a look at the hint in the next step in order to integrate the Android 6.0 permission request correct!

Integration

In order to open the camera preview and pass the resulting image to the editor, create a CameraPreviewBuilder and start the CameraPreviewActivity with startActivityForResult(activity, custom_id):

Please make sure you delegate the onRequestPermissionsResult to PermissionRequest.onRequestPermissionsResult as demonstrated in the following example. This ensures correct behavior on Android 6.0 and above.

public class CameraDemoActivity extends Activity implements PermissionRequest.Response {

    // Important permission request for Android 6.0 and above, don't forget to add this!
    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        PermissionRequest.onRequestPermissionsResult(requestCode, permissions, grantResults);
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }

    @Override
    public void permissionGranted() {}

    @Override
    public void permissionDenied() {
        /* TODO: The Permission was rejected by the user. The Editor was not opened,
         * Show a hint to the user and try again. */
    }

    public static int PESDK_RESULT = 1;

    private PhotoEditorSettingsList createPesdkSettingsList() {

        // Create a empty new SettingsList and apply the changes on this referance.
        PhotoEditorSettingsList settingsList = new PhotoEditorSettingsList();

        // If you include our asset Packs and you use our UI you also need to add them to the UI,
        // otherwise they are only available for the backend
        // See the specific feature sections of our guides if you want to know how to add our own Assets.

        settingsList.getSettingsModel(UiConfigFilter.class).setFilterList(
          FilterPackBasic.getFilterPack()
        );

        settingsList.getSettingsModel(UiConfigText.class).setFontList(
          FontPackBasic.getFontPack()
        );

        settingsList.getSettingsModel(UiConfigFrame.class).setFrameList(
          FramePackBasic.getFramePack()
        );

        settingsList.getSettingsModel(UiConfigOverlay.class).setOverlayList(
          OverlayPackBasic.getOverlayPack()
        );

        settingsList.getSettingsModel(UiConfigSticker.class).setStickerLists(
          StickerPackEmoticons.getStickerCategory(),
          StickerPackShapes.getStickerCategory()
        );

        return settingsList;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        openCamera();
    }

    private void openCamera() {
        PhotoEditorSettingsList settingsList = createPesdkSettingsList();

        new CameraPreviewBuilder(this)
          .setSettingsList(settingsList)
          .startActivityForResult(this, PESDK_RESULT,  PermissionRequest.NEEDED_PREVIEW_PERMISSIONS_AND_FINE_LOCATION);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, android.content.Intent intent) {
        super.onActivityResult(requestCode, resultCode, intent);

        if (resultCode == RESULT_OK && requestCode == PESDK_RESULT) {
            // Editor has saved an Image.
            EditorSDKResult data = new EditorSDKResult(intent);

            data.notifyGallery(EditorSDKResult.UPDATE_RESULT & EditorSDKResult.UPDATE_SOURCE);

            Log.i("PESDK", "Source image is located here " + data.getSourceUri());
            Log.i("PESDK", "Result image is located here " + data.getResultUri());

            // TODO: Do something with the result image

            // OPTIONAL: read the latest state to save it as a serialisation
            SettingsList lastState = data.getSettingsList();
            try {
                new IMGLYFileWriter(lastState).writeJson(new File(
                  Environment.getExternalStorageDirectory(),
                  "serialisationReadyToReadWithPESDKFileReader.json"
                ));
            } catch (IOException e) { e.printStackTrace(); }

        } else if (resultCode == RESULT_CANCELED && requestCode == PESDK_RESULT) {
            // Editor was canceled
            EditorSDKResult data = new EditorSDKResult(intent);

            Uri sourceURI = data.getSourceUri();
            // TODO: Do something...
        }
    }
}

Start Editor standalone (without camera).

If you want to open the editor directly with an existing image look at this example:

public class EditorDemoActivity extends Activity implements PermissionRequest.Response {

    // Important permission request for Android 6.0 and above, don't forget to add this!
    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        PermissionRequest.onRequestPermissionsResult(requestCode, permissions, grantResults);
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }

    @Override
    public void permissionGranted() {}

    @Override
    public void permissionDenied() {
        /* TODO: The Permission was rejected by the user. The Editor was not opened,
         * Show a hint to the user and try again. */
    }

    public static int PESDK_RESULT = 1;
    public static int GALLERY_RESULT = 2;

    private SettingsList createPesdkSettingsList() {

        // Create a empty new SettingsList and apply the changes on this referance.
        PhotoEditorSettingsList settingsList = new PhotoEditorSettingsList();

        // If you include our asset Packs and you use our UI you also need to add them to the UI,
        // otherwise they are only available for the backend
        // See the specific feature sections of our guides if you want to know how to add our own Assets.

        settingsList.getSettingsModel(UiConfigFilter.class).setFilterList(
            FilterPackBasic.getFilterPack()
        );

        settingsList.getSettingsModel(UiConfigText.class).setFontList(
          FontPackBasic.getFontPack()
        );

        settingsList.getSettingsModel(UiConfigFrame.class).setFrameList(
          FramePackBasic.getFramePack()
        );

        settingsList.getSettingsModel(UiConfigOverlay.class).setOverlayList(
          OverlayPackBasic.getOverlayPack()
        );

        settingsList.getSettingsModel(UiConfigSticker.class).setStickerLists(
          StickerPackEmoticons.getStickerCategory(),
          StickerPackShapes.getStickerCategory()
        );

        return settingsList;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        openSystemGalleryToSelectAnImage();
    }

    private void openSystemGalleryToSelectAnImage() {
        Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
        if (intent.resolveActivity(getPackageManager()) != null) {
            startActivityForResult(intent, GALLERY_RESULT);
        } else {
            Toast.makeText(
              this,
              "No Gallery APP installed",
              Toast.LENGTH_LONG
            ).show();
        }
    }

    private void openEditor(Uri inputImage) {
        SettingsList settingsList = createPesdkSettingsList();

        // Set input image
        settingsList.getSettingsModel(LoadSettings.class).setSource(inputImage);

        settingsList.getSettingsModel(PhotoEditorSaveSettings.class).setOutputToGallery(Environment.DIRECTORY_DCIM);

        new EditorBuilder(this)
          .setSettingsList(settingsList)
          .startActivityForResult(this, PESDK_RESULT);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
        super.onActivityResult(requestCode, resultCode, intent);

        if (resultCode == RESULT_OK && requestCode == GALLERY_RESULT) {
            // Open Editor with some uri in this case with an image selected from the system gallery.
            Uri selectedImage = intent.getData();
            openEditor(selectedImage);

        } else if (resultCode == RESULT_OK && requestCode == PESDK_RESULT) {
            // Editor has saved an Image.
            EditorSDKResult data = new EditorSDKResult(intent);

            // This adds the result and source image to Android's gallery
            data.notifyGallery(EditorSDKResult.UPDATE_RESULT & EditorSDKResult.UPDATE_SOURCE);

            Log.i("PESDK", "Source image is located here " + data.getSourceUri());
            Log.i("PESDK", "Result image is located here " + data.getResultUri());

            // TODO: Do something with the result image

            // OPTIONAL: read the latest state to save it as a serialisation
            SettingsList lastState = data.getSettingsList();
            try {
                new IMGLYFileWriter(lastState).writeJson(new File(
                  Environment.getExternalStorageDirectory(),
                  "serialisationReadyToReadWithPESDKFileReader.json"
                ));
            } catch (IOException e) { e.printStackTrace(); }

        } else if (resultCode == RESULT_CANCELED && requestCode == PESDK_RESULT) {
            // Editor was canceled
            EditorSDKResult data = new EditorSDKResult(intent);

            Uri sourceURI = data.getSourceUri();
            // TODO: Do something with the source...
        }
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].