Skip to content
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

Request: split the repository into 2, so that one would be a dependency all can use to decode Jpeg XL easily, using Java/Kotlin #25

Open
AndroidDeveloperLB opened this issue Aug 26, 2023 · 14 comments

Comments

@AndroidDeveloperLB
Copy link

As the title says.

@oupson
Copy link
Owner

oupson commented Aug 27, 2023

The app and the lib are already separated in the repository. When the lib will be more usable, I intend to publish it (on mavencentral if I figure it out how to publish on it).

@AndroidDeveloperLB
Copy link
Author

@oupson So maybe it's possible to use Jitpack without any effort from your side, no?

@AndroidDeveloperLB
Copy link
Author

@oupson It seems it should be possible:
https://jitpack.io/#oupson/jxlviewer

However, for some reason there is an error with v0.3.0

@oupson
Copy link
Owner

oupson commented Aug 27, 2023

@oupson It seems it should be possible: https://jitpack.io/#oupson/jxlviewer

However, for some reason there is an error with v0.3.0

Yeah I got the same problem with my other library, it is quite easy to fix : https://github.com/oupson/Kapng-Android/blob/master/jitpack.yml

@AndroidDeveloperLB
Copy link
Author

jdk:
  - openjdk17

?

@oupson
Copy link
Owner

oupson commented Aug 27, 2023

Jitpack is still using jdk 8 when AGP require jdk 17

@AndroidDeveloperLB
Copy link
Author

Oh....
Are there more issues you know of?

@oupson
Copy link
Owner

oupson commented Aug 27, 2023

Well sometimes build time out and you can't restart it, but otherwise nothing I'm aware of

@oupson
Copy link
Owner

oupson commented Aug 27, 2023

This should work (untested):

dependencies {
	        implementation 'com.github.oupson:jxlviewer:94fe98aaa4'
}

@AndroidDeveloperLB
Copy link
Author

Thank you. Is this library better than others in some way?
I can see this one for example:
https://github.com/awxkee/jxl-coder

But I don't see a license there, and I don't see a way to downsample the image (to avoid using too much memory in case the image is huge) in the main page.
Is it possible for jxl file format?

@oupson
Copy link
Owner

oupson commented Aug 27, 2023

I wasn't aware there were other libraries for android, so I don't know which one is better. However jxl-coder seems to be able to encode jxl.

Down-sampling should to be possible with the jxl format.

@AndroidDeveloperLB
Copy link
Author

I haven't checked the code here.
Do you use down-sampling in the sample, or have some documentation about it?
Maybe there is even some integration for Glide library?

@oupson
Copy link
Owner

oupson commented Aug 27, 2023

No sorry I don't have any example. Down sampling could probably be down when decoding each frames. I'm not aware with any integration with the glide library.

I intend to invest more time to build a better library in the future, for the moment it is very simple.

@AndroidDeveloperLB
Copy link
Author

Using BitmapFactory it's possible to get information about the image without actually saving the bitmap.
And you can then know how much to down-sample it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants