-
Notifications
You must be signed in to change notification settings - Fork 212
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
Initial implementation of android.graphics.BitmapFactory #460
Conversation
106101f
to
a18f387
Compare
You can steal a lot of source code from android itself usually |
That probably won't help much with Bitmaps or Canvas though, a lot of the source uses native code. |
a18f387
to
8db535d
Compare
I have tested the compression code, turns out OpenJDK does not have a native JPEG decoder so I'll default to PNG no matter what. |
Feel free to implement libraries that add extra image support. I think there are libraries that add jpeg support for ImageIO |
Also if you need implementations that are available in third party packages you could add them to dependencies and use them, for example to make dateformat work we used |
8db535d
to
fed0c72
Compare
I've added the TwelveMonkeys JPEG encoder and now JPEG also works. I got the the Canvas partially working (works with the MangaReader.to currently, but I believe some extensions use more parts of it, I will have to look into it), should I leave that for a different PR or add it to this? |
@animeavi |
This part of it is ready, I'll do a follow up PR for the Rect and Canvas stuff cause it kinda depends on this being merged first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to regenerate android.jar after this
Only what was needed is implemented, compression method is still untested.
fed0c72
to
ccf404c
Compare
Only what was needed is implemented, compression method is still untested.
This is relevant to #444
it does not fix the issue yet, stuff from
android.graphics.Canvas
andandroid.graphics.Rect
is still needed (I have not looked into how hard that would be for me, so no promises) to support extensions that manipulate images, but this at least gets the image to the extension.