burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.12k stars 989 forks source link

PE-426: Change core app over to Kotlin #428

Closed lucianocheng closed 2 years ago

lucianocheng commented 2 years ago

Ports the core PhotoEditorSDK over to Kotlin.

lucianocheng commented 2 years ago

@burhanrashid52 not yet ready to review. Still actively working on it.

burhanrashid52 commented 2 years ago

@lucianocheng I've fixed the conflicts in kotlin-conversion and merged it to master. You can now take the latest from master and can point this branch to master.

lucianocheng commented 2 years ago

@burhanrashid52 perfect timing, we are almost done.

lucianocheng commented 2 years ago

@burhanrashid52 I think this is ready.

Let me know if you see anything that needs changing, otherwise please merge in. Thanks.

lucianocheng commented 2 years ago

@burhanrashid52 comments addressed. I think we're set 👍 .

First of all, Thank you for taking the time to convert this into Kotlin. Overall I am happy with most of the changes, just added one comment.

👍 . Shout out to @tiendung717 on my team who did the bulk of the core library conversion.

Since it's now in Kotlin I see many opportunities to do some cleanup and make the API design better. Maybe a future task to work on.

👍 . Now that the code is converted to Kotlin, here's our punch list for things we will port over. We already have solutions for these:

  1. Fixes for file saving / permission logic
  2. Fixed sticker handle sizes
  3. Better handling of pinch action for resizing.

Re: API / Further work. Speaking strictly for our use case, the most important things to add are also the hardest (and have been on the PhotoEditor TODO list for awhile). We have sketches for these but they will require significant refactoring, we will try them ourselves first if we get to them:

  1. Zoom / crop / rotation of the main image (requires refactoring the main image stack).
  2. Ability to save a draft of the edit, and recover a draft (requires tracking and recovering all state).
  3. Ability to "represent" a high resolution version of the image rather than saving from the Views (requires (2) and rewriting the export logic).
burhanrashid52 commented 2 years ago

Thank you @tiendung717 for your effort.

@lucianocheng Sounds like a good plan to me. Let's me first release this version 2.0, meanwhile, you can raise PR for the already fix bugs.

After that, we can discuss more on the refactoring part.