All Projects → burhanrashid52 → Photoeditor

burhanrashid52 / Photoeditor

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

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Photoeditor

Ananas
An easy image editor integration for your Android apps.
Stars: ✭ 186 (-94.01%)
Mutual labels:  stories, paint, instagram, facebook, canvas, filters
spark-ar-creators
List of 9500 (and counting) Spark AR Creators. Open an issue or contact me if you want to be added.❤️
Stars: ✭ 122 (-96.07%)
Mutual labels:  instagram, facebook, filters
Zuck.js
A javascript library that lets you add stories EVERYWHERE.
Stars: ✭ 3,396 (+9.37%)
Mutual labels:  facebook, instagram, stories
hashtag.io
Hashtag.io is a PHP based social networking website, which supports exclusive multimedia content, sharing and private or group messaging service.
Stars: ✭ 64 (-97.94%)
Mutual labels:  instagram, facebook, stickers
Gaussianblur
An easy and fast library to apply gaussian blur filter on any images. 🎩
Stars: ✭ 473 (-84.77%)
Mutual labels:  image-processing, filters, canvas
instagram-stories
Get the Instagram Stories in Node.js and Browser
Stars: ✭ 86 (-97.23%)
Mutual labels:  stories, instagram, facebook
Photo Editor Android
Photo Editor SDK contains a lot of features like edit, scale, rotate and draw on images like Instagram stories.
Stars: ✭ 463 (-85.09%)
Mutual labels:  image-processing, facebook, instagram
Vintagejs
Add a retro/vintage effect to images using the HTML5 canvas element
Stars: ✭ 826 (-73.4%)
Mutual labels:  image-processing, instagram, canvas
Skeleton
Skeleton is a Social Engineering tool attack switcher
Stars: ✭ 44 (-98.58%)
Mutual labels:  instagram, facebook
react-reactions
😲 Create custom reaction pickers and counters or use your favorites!
Stars: ✭ 34 (-98.9%)
Mutual labels:  emoji, facebook
VKRdownloader
Vkrdownloader: All in one Video Downloader - Download videos from facebook twitter youtube tiktok and 1000+ other sites . YouTube downloader , facebook downloader . made by Vijay Kumar
Stars: ✭ 25 (-99.19%)
Mutual labels:  instagram, facebook
MyIGBot
MyIGBot is a Private API for Instagram to like, follow, comment, view & intaract with stories, upload post & stories, get all information about a user/posts and get posts based on locations/hashtags. It also supports proxy.
Stars: ✭ 137 (-95.59%)
Mutual labels:  stories, instagram
Whizzz-The-ChatApp
Whizzz is a real-time, one-to-one Android chat application made using Firebase, a beautiful user interface, and a push-notification feature.
Stars: ✭ 66 (-97.87%)
Mutual labels:  instagram, facebook
DaProfiler
DaProfiler allows you to create a profile on your target based in France only. The particularity of this program is its ability to find the e-mail addresses your target.
Stars: ✭ 58 (-98.13%)
Mutual labels:  instagram, facebook
Social-Media-Automation
Automate social media because you don't have to be active on all of them😉. Best way to be active on all social media without actually being active on them. 😃
Stars: ✭ 186 (-94.01%)
Mutual labels:  instagram, facebook
FaceFilter
Snapchat and Instagram like Face Filter.
Stars: ✭ 72 (-97.68%)
Mutual labels:  instagram, filters
CollectionLayouts
A collection of UICollectionViewLayouts
Stars: ✭ 64 (-97.94%)
Mutual labels:  stories, instagram
ios-emojikeyboard
Emoji Keyboard for iOS (support sticker as well)
Stars: ✭ 19 (-99.39%)
Mutual labels:  emoji, stickers
jmonet
An easy-to-use toolkit for incorporating MacPaint / Microsoft Paint-like tools into a Java Swing or JavaFX application.
Stars: ✭ 27 (-99.13%)
Mutual labels:  paint, canvas
Timeliner
In general, Timeliner obtains items from data sources and stores them in a timeline.
Stars: ✭ 2,911 (-6.25%)
Mutual labels:  facebook, instagram

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

  • Drawing on image with option to change its Brush's Color, Size, Opacity, Erasing and basic shapes.
  • Apply Filter Effect on image using MediaEffect
  • Adding/Editing Text with option to change its Color with Custom Fonts.
  • Adding Emoji with Custom Emoji Fonts.
  • Adding Images/Stickers
  • Pinch to Scale and Rotate views.
  • Undo and Redo for Brush and Views.
  • Deleting Views
  • Saving Photo after editing.
  • More FAQ.

Benefits

  • Hassle free coding
  • Increase efficiency
  • Easy image editing

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 :)

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:1.5.1'

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

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)

PhotoEditorView mPhotoEditorView = findViewById(R.id.photoEditorView);

mPhotoEditorView.getSource().setImageResource(R.drawable.got);

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
Typeface mTextRobotoTf = ResourcesCompat.getFont(this, R.font.roboto_medium);

//loading font from asset
Typeface mEmojiTypeFace = Typeface.createFromAsset(getAssets(), "emojione-android.ttf");

mPhotoEditor = new PhotoEditor.Builder(this, mPhotoEditorView)
         .setPinchTextScalable(true)
         .setClipSourceImage(true)
         .setDefaultTextTypeface(mTextRobotoTf)
         .setDefaultEmojiTypeface(mEmojiTypeFace)
         .build();

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) 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.

mShapeBuilder = new ShapeBuilder()
         .withShapeOpacity(100)
         .withShapeType(ShapeType.OVAL)
         .withShapeSize(50);

mPhotoEditor.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

We can add the text with inputText and colorCode like this

mPhotoEditor.addText(inputText, colorCode);

It will take default fonts provided in the builder. If we want different fonts for different text we can set typeface with each text like this

mPhotoEditor.addText(mTypeface,inputText, colorCode);

In order to edit the text we need the view, which we will receive in our PhotoEditor callback. This callback will trigger when we Long Press the added text

mPhotoEditor.setOnPhotoEditorListener(new OnPhotoEditorListener() {
           @Override
           public void onEditTextChangeListener(View rootView, String text, int colorCode) {
               
           }
       });

Now we can edit the text with a view like this

mPhotoEditor.editText(rootView, inputText, colorCode);

If you want more customization on text. Please refer the wiki page for more details.

Emoji

We can add the Emoji by PhotoEditor.getEmojis(getActivity()); which will return a list of emojis unicode.

mPhotoEditor.addEmoji(emojiUnicode);

It will take default fonts provided in the builder. If we want different Emoji fonts for different emoji we can set typeface with each Emoji like this

mPhotoEditor.addEmoji(mEmojiTypeface,emojiUnicode);

Adding Images/Stickers

We need to provide a Bitmap to add our Images mPhotoEditor.addImage(bitmap);

Undo and Redo

  mPhotoEditor.undo();
  mPhotoEditor.redo();

Deleting

For deleting a Text/Emoji/Image we can click on the view to toggle the view highlighter box which will have a close icon. So, by clicking on the icon we can delete the view.

Saving

We need to provide a file with callback method when edited image is saved

 mPhotoEditor.saveAsFile(filePath, new PhotoEditor.OnSaveListener() {
                 @Override
                 public void onSuccess(@NonNull String imagePath) {
                    Log.e("PhotoEditor","Image Saved Successfully");
                 }

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

For more detail check Saving

How to contribute?

Questions?🤔

Hit me on twitter Twitter Medium Facebook

FAQ

Can I use this library in my app for free?

Yes. It's an open-source library and free to use. If this library has saved your time then showing a little credit will increase my motivation towards making the library better :)

Does it support the CROP feature?

Currently, No. I started to build in branch PE-79. But due to time constraint, I drop the idea. Any PR related to CROP is welcomed :)

Facing issues in applying Filter?

The filter effect is applied using GlSurfaceView and the implementation of this feature causing a lot of issues. Need to think of some other alternative solution. Here is the issue list.

Does is support in other platforms (iOS, Web, Flutter)?

No. Currently, the focus is on making the android library better. We don't have any plans for other Platform.

Other Know Issues

Image Scaling.
Memory Issue in Filter.

Who is using PhotoEditor?

  1. Best Quotes & Status 2019 (99000+ Collection)
  2. Pixxo

Note: I will be happy to add your app to the list. Please reach out to me with details. You know how to reach me :)

Credits

This project is inspired from PhotoEditorSDK

Buy a cup of coffee

If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of ☕️ BuyMeACoffee

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

MIT License

Copyright (c) 2020 Burhanuddin Rashid

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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].