Comments (5)
Hi @developerGM
Please provide more details about the library version and phone details.
from filepicker.
Hi,
the library version is 0.2.2
Mobile phone: Xiaomi 9T, Android 10
from filepicker.
Hi @ChochaNaresh
any news about this issue?
from filepicker.
Hi @developerGM
You can use the following code to find the rotation, then save the rotation picture as a new file to resolve your issue.
`
String selectedImage = data.getData();
String[] filePathColumn = {MediaStore.Images.Media.DATA};
Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
filePath = cursor.getString(columnIndex);
cursor.close();
int rotateImage = getCameraPhotoOrientation(MyActivity.this, selectedImage, filePath);
`
`
public int getCameraPhotoOrientation(Context context, Uri imageUri, String imagePath){
int rotate = 0;
try {
context.getContentResolver().notifyChange(imageUri, null);
File imageFile = new File(imagePath);
ExifInterface exif = new ExifInterface(imageFile.getAbsolutePath());
int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_270:
rotate = 270;
break;
case ExifInterface.ORIENTATION_ROTATE_180:
rotate = 180;
break;
case ExifInterface.ORIENTATION_ROTATE_90:
rotate = 90;
break;
}
Log.i("RotateImage", "Exif orientation: " + orientation);
Log.i("RotateImage", "Rotate value: " + rotate);
} catch (Exception e) {
e.printStackTrace();
}
return rotate;
}
`
from filepicker.
limited conversation
from filepicker.
Related Issues (16)
- Android 12 Video Capture Issue HOT 1
- Android 10 Permission Denied dialog
- Video Picker Crash
- Does this lib support Java? HOT 1
- Crash on Xiomi Note 5 pro - Android 9 - API 28
- Gradle Plugin 8.0 suppoort HOT 1
- App Crashed When I try to pick a document from storage in Android 10 or higher.
- App Crashed When I try to pick a pdf document from storage in Android 12 motorola from recents or whatsapp media document HOT 3
- Maximum file selection Issue HOT 2
- Android 14 issue HOT 2
- Dark Theme support HOT 1
- Android 13 And Android 14 videoCapture Error HOT 1
- Android 10 issue HOT 2
- Config camera facing option HOT 3
- Opening binary files (.hex, .mot, ...) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filepicker.