-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Kotlin Multiplatform (KMP) package of jpegtran (lossless JPEG transformations) #5386
Comments
Kotlin multiplatform will let you pull the C code in and make it accessible to Kotlin/Native but I am pretty sure you will still need to use JNI and the Android NDK if you want to access the code from the main Android source-set. That said, you should be able to create a project and provide an AAR that the rest of the app can use if you configure things as a library project. |
The idea would be to have a separate GitHub project whose goal is to produce a library that offers these transformations. Our Commons app would only import that library (like any other external library, presumably through build.gradle) and use the methods. Hopefully building the Commons would just require Android Studio. Does that sound like a good plan? 🙂 |
The separate AAR library published as a maven/gradle dependency would definitely be easy to use & transparent to the casual developer of the commons app. 👍 |
Can I take on this issue? @nicolas-raoul could you assign it to me? |
@shashankiitbhu It is yours! |
Hi @nicolas-raoul I am having difficulty with implementing jpegtran library in KMP , also there isn't any android or KMP library already available for this. However, there is a library in java for lossless JPEG transformations - https://github.com/k3b/LosslessJpgCrop/tree/master |
@shashankiitbhu I am familiar with the project you linked to, but I am not sure whether the underlying Facebook Spectrum library can be used to implement near-lossless blurring. @shankarpriyank What do you think? 🙂 |
Had a quick glance, could not find anything related to blurring in the Spectrum library. |
If Spectrum has a method to losslessly merge several JPEGs, then we can use it. Please note that k3b's app is licensed under GPL, so we can't copy its code to our Apache-licensed app. |
Sorry, I did not get it.
Yup, What I meant to say was that, k3b is a nice application which has a cropping feature, and cause it's open-source, I can take inspiration from its code to implement the cropping feature in the commons app. Some parts of the code may be quite similar but I guess that wont be an issue. |
@shashankiitbhu I unassign for now, but if you are you still working on this, please let us know. If no answer, someone else may be assigned to it. Thanks a lot. :-) |
jpegtran is a library for lossless JPEG transformations, available mostly as C source code. We want to use it to implement lossless crop and other lossless transforms.
However, the app must still be easily buildable by newcomers who just have a basic Android Studio (and thus can't compile C code).
The goal of this issue is to build (or find if by chance one is already available) a package based on Kotlin Multiplatform technology embedding jpegtran, and offering JPEG transformations that can be used from a Kotlin Android app. Please create a different GitHub project for this task. Any volunteer? Thanks! :-)
Tagged "good first issue" not because it is easy, but because no knowledge of Commons is needed.
The text was updated successfully, but these errors were encountered: