-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Fixes issue #75 #110
Fixes issue #75 #110
Conversation
Copied dimension classes over since they are only used for holding the width and height. Replaced the ImageUtils class for spreadsheets and reads the file contents to determine size versus using javax.imageio classes.
Thanks for the work!
|
Thanks for heading the port to android. Yeah everything was the same from ImageUtils except I changed the getImageDimension method to not make any calls to the javax.imageio classes. I thought it would be a safe-enough change considering that getImageDimension seems to only be called in ImageUtils. But yeah that's a good point, it could cause some unforeseen issues. Yeah it looks like there would need to be some abstraction of the Apache POI's image I/O to allow other JVM systems (that don't have javax) to register their own Image I/O provider. Then a system could implement the abstract methods and register it as the provider, or something like that. But abstracting that, then reimplementing that with android's graphics seems like a lot of work and I'm not sure how feasible it would be. That might be a difficult merge request to get through. Good idea, I'll look to add the scenarios for the other supported file formats. |
Is there a way to provide the replacement-code via classes in the javax.imageio package and relocate it similar to the awt classes so that Apache POI can stay unchanged? |
Good point, I think that makes the most sense. I'll look into that. I suppose there should really be no harm going that route considering the imageIO library doesn't work now anyways. Although it will take some time since I don't think the shadow classes have access to the android SDK. I'll move this request to a draft in the mean time. |
…ized instead of problematic javax.imageio classes.
…inished JPG and BMP readers. Just needs possible optimization, comments and clean up.
I added only necessary shadow classes for java.awt and java.imageio and added some compatibility classes for reading image files. The functionality is only focused on fixing the resizing issue, but would still have some functionality in other areas that uses those same methods. Or at least maybe a good starting point if other compatibility is desired. |
Thanks for the work, I'll try to take a look in the coming days. |
Thanks a lot for the changed approach, works great when testing the sample-app! |
Copied dimension classes over since they are only used for holding the width and height.
Replaced the ImageUtils class for spreadsheets and reads the file contents to determine size versus using javax.imageio classes.