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

Use unified interface for all types of images(Fixes #21) #22

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

wh201906
Copy link
Contributor

I rewrite the code in getSize() to simplify the code. This fixes #21
Here are the changes.

  • Try to get rotation info for all types of image
  • Use InputStream for all types of image
  • Use ContentResolver.openInputStream for uris start with content://, file:// and android.resource://
  • Use URL.openStream() for remote images

Try to get rotation info for all types of image
Use InputStream for all types of image
Use ContentResolver.openInputStream for content://, file:// and android.resource://
Use URL.openStream() for remote images
If SdkVersion >= 24, use ExifInterface(InputStream inputStream)
If SdkVersion < 24 and the uri starts with file://, use ExifInterface(String filename)
@eXist-FraGGer eXist-FraGGer merged commit 5177b73 into eXist-FraGGer:master Oct 13, 2023
1 check passed
@wh201906 wh201906 deleted the fix-bitmap branch October 14, 2023 16:43
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

Successfully merging this pull request may close these issues.

Android build error: variable bitmap is already defined
2 participants