43 questions
-1
votes
0
answers
44
views
PhotoPicker Uris can only be accessed to read
I tried changing the exif tags, but I got the error "java.lang.SecurityException: PhotoPicker Uris can only be accessed to read...". I don't know what to do.
fun saveNewData(newData: ...
0
votes
0
answers
51
views
ExifInterface only ads Speed Ref but not value itself
I tried the following code:
exif.setAttribute(
ExifInterface.TAG_GPS_SPEED,
"50"
)
exif.setAttribute(
ExifInterface.TAG_GPS_SPEED_REF,
ExifInterface....
0
votes
1
answer
205
views
ExifInterface gives me wrong rotation
I would like to convert a landscape format into a portrait format. For this I use the following code. The problem is that the rotation in the end is not right, see second picture. What do I have to ...
0
votes
1
answer
728
views
android exif get longtitude and latitude
I used to use the following code to get the address of a picture. And it worked well.
private static AddressVO getAddress(ExifInterface exifInterface, Context context){
if (exifInterface == null){
...
0
votes
0
answers
143
views
Reading photos with Exif metadata
I am implementing a grid gallery in my Android app in which photos are sorted according to the photo's Exif metadata. All photos are read from a specific folder stored in Shared Storage at /DCIM or /...
0
votes
1
answer
476
views
Location information parsed failure with ExifInterface in Android
I'm working on a map gallery. I need location information of photos. While working on this, I encountered a wired situation.
I used intent to call ACTION_OPEN_DOCUMENT and picked an image. Then used ...
1
vote
0
answers
32
views
Shot image is displayed in the wrong orientation. It only works in the emulator
I have an understanding problem. I take a photo and then want to display it in the correct orientation. If I run through the whole thing on the emulator, everything works. Only on the right device, ...
0
votes
1
answer
402
views
Permission denied error when using ExifInterface with Kotlin
I'm currently working on an app where u can edit some metatags of an image. The app is build using flutter. To edit the metadata I'm using Kotlin. Currently I can read metadata from a given image path ...
1
vote
0
answers
198
views
Android - Adding information to Image's EXIF
I want to add GPS information to an image. I created that image at a Uri returned by ContentResolver.Insert().
I found out that ExifInterface can be used to write the GPS information, but to use it I ...
0
votes
1
answer
969
views
Android ExifInterface longitude & latitude missing after android 10
I'm trying to create an app that allows the user to select a file and display the GPS long/lat found in the photo EXIF metadata.
I can get the GPS long/lat if the user selects an image from the recent ...
1
vote
0
answers
136
views
Find TAGS for custom values in exif Android
Hello i am trying to write custom values in EXIF of my .jpg images but i can't find some of the TAG that would be equivalent to the following :
I have tried to find the TAGs here : https://developer....
1
vote
0
answers
267
views
Can I create image exif data just base on a Bitmap?
I want to save a Bitmap into a *.HEIC file. When I saved a heif file and reopen it by ImageDecoder, it report those errors. I think it may because image file does not have exif data. I check ...
7
votes
1
answer
3k
views
Retrieving GPS EXIF data from images using AndroidX ExifInterface?
I'm targeting Android 13 and using the new photo picker to retrieve images. E.g.
val photoPicker = rememberLauncherForActivityResult(
contract = ActivityResultContracts.PickMultipleVisualMedia(...
0
votes
1
answer
219
views
How can I get the info of an image with exifinterface in the fragment
Uri uri = ImageView.setImageURI(Uri.parse(new File(path).toString()));
gfgIn = getContentResolver().openInputStream(uri);
ExifInterface exifInterface = new ExifInterface(gfgIn);
The code above isn't ...
1
vote
0
answers
556
views
Exception: Failed resolution of: Landroidx/exifinterface/media/ExifInterface;
First, I am aware of a similar question. My situation is different and odd.
An app Foo does not directly use ExifInterface at all. It depends on libraryFoo which is included as an AAR package. ...
2
votes
0
answers
368
views
ExifInterface 1.3.3 returns "0/1 0/1" for longitude and latitude values
fun ExifInterface.getTags(): HashMap<String, String> {
val mAttributes = mAttributes()
var map = HashMap<String, String>()
if (mAttributes is Array<*>) {
...
1
vote
1
answer
1k
views
how to resolve java.io.FileNotFoundException when trying to get inputstream from AWS url
my main goal is to get the orientation of a image which I get from AWS, part of the code is to first get the imputStream for which I need to pass the URI, I am doing Uri.parse(url) to get the uri and ...
0
votes
0
answers
113
views
rotate the bitmap received the AWS using EXIF
I have a ExifUtil which rotates the bitmap based on EXIF, this class works fine if the path of the image local on the device.
I want to use the same class or same functionality if the image path is ...
0
votes
1
answer
1k
views
EXIF direction (compass) tags
I would like to add the compass bearing/direction to the EXIF metadata of images, however I am quite confused about the many tags in ExifInterface and especially, which formats to use. Could anyone ...
1
vote
1
answer
347
views
Does ExifInterface.TAG_SHUTTER_SPEED_VALUE really measure shutter speed? If so, how to convert it to a more standard format?
I'm trying to get camera shutter speed when a photo is taken with Android camera. Using this instruction in an image the app creates that contains the taken photo.
double vel = exif.getAttributeDouble(...
3
votes
0
answers
1k
views
Failed to extract location (lat,long) coordinates from image media using EXIF in Android
I am trying to extract location coordinates from image media in my Android app but ExifInterface providing a null value even though image media contains those details. I had tried on Android 9, 10, ...
1
vote
0
answers
67
views
Cannot write GPSTimeStamp properly in ExifInterface
I'm trying to write that property as exif data using exif interface, but the exif reader I'm using never recognizes the defined data.
I've tried it with things like the following:
exif.setAttribute(&...
1
vote
1
answer
855
views
Copy all exif tags from one jpeg to another
I am trying to figure out the best way to copy all exif tags from one JEPG to another. Looks like ExifInterface (https://developer.android.com/reference/android/media/ExifInterface) is my best bet.
...
0
votes
1
answer
515
views
JPEG gets corrupt when saving image with exif metadata
I am developing an Android app that saves bitmaps as jpeg images to the external storage. It occasionally happens that the JPEGs get corrupt (see image below). I have realized that corruption (...
0
votes
0
answers
342
views
Uri to bitmap conversion rotates the image
I have an app that has image upload feature and after uploading the image on onActivityResult() I receive the Uri of the image and turn it into bitmap with the following function :
private fun ...
2
votes
1
answer
2k
views
All images taken with Android CameraX have incorrect orientation in their EXIF data
I am using CameraX https://developer.android.com/training/camerax to take some images. However, all my images come out the wrong rotation. They are all marked: ORIENTATION_ROTATE_90 Yes, I have ...
0
votes
0
answers
343
views
Android: Get address of an image using ExifInterface in Kotlin
Is it possible to get the image address using ExifInterface? On Android, while viewing the exif information image has the address populated.
1
vote
1
answer
1k
views
Exifinterface saveAttributes() fail because of 'Failed to copy original file to temp file'
So now I'm writing custom camera, and I want to write location into images that I captured, for some reason I cannot use builder.set() here.
The file was created like this:
String name = System....
2
votes
0
answers
516
views
Android Camera Exif no orientation data but Image is rotated
I am using following helper class to handle sampling and rotation of the Camera Image.
object CaptureImageHelper {
/**
* This method is responsible for solving the rotation issue if exist. Also ...
2
votes
1
answer
3k
views
Androidx Exifinterface crashes when try to saveAttributes. Write failed: EBADF (Bad file descriptor)
When trying to save any JPEG picture using saveAttributes() from androidx Exifinterface, my program crashes with the error "write failed: EBADF (Bad file descriptor)"
I can replicate the ...
0
votes
0
answers
315
views
BitmapFactory.decodeByteArray() works incorrect after using ExifInterface
I try to add simple functionality with getting picture from gallery or from camera in my Android app. And all works fine, I successfully obtain uri of picture and after that want to show this picture ...
0
votes
1
answer
2k
views
Write EXIF data after have added image to MediaStore
I just need to add some Exif metadata to a Jpeg saved to MediaStore (using Content Resolver)
Here how I save the image:
ContentValues values = new ContentValues();
values.put(MediaStore.Images....
1
vote
1
answer
1k
views
How to edit exif in android Q
I want to create an jpg and edit its exif.
Before, I use ExifInterface:
ExifInterface exifInterface = new ExifInterface(filePath)
exifInterface.setAttribute(...)
exifInterface.setAttribute(...)
...
0
votes
1
answer
500
views
How to get EXIF attributes that Android ExifInterface cannot find?
I am trying to read the EXIF information of images taken by a UAV (more specifically, DJI Mavic 2).
I have sucessfully get some attributes ( "GPS Altitude","GPS Longitude","...
5
votes
2
answers
2k
views
Android 11 get image orientation from EXIF
Hi I have an app with compileSdkVersion 30 and targetSdkVersion 30.
Since I need to know the orientation of image, I wrote these:
val exif = ExifInterface(imageFile.absolutePath)
val ...
0
votes
0
answers
3k
views
ExifInterface FileNotFoundException /storage/emulated/0/DCIM/Camera/IMG_20200319_211738.jpg
After capturing an image from the Android Emulator in Android Studio i get a content URI and through that i want to proccess the Image. One of that proccess is that i want to modify the orientation. ...
-1
votes
1
answer
519
views
ExifInterface: getAttribute for TAG_USER_COMMENT only returns "UNICODE"
I am using ExifInterface to read the UserComments EXIF tag in a jpeg file in my Java Android Studio app.
I can use the exiftool command in Linux to verify that there IS data in the UserComment field.
...
0
votes
1
answer
171
views
Image is uploading rotated to the server in my Android Project?
My Problem here is while uploading image to the Server, the image uploads rotated. Any Help Please. Can i get any help in rectifying my problem. Help me out. And i don't know how to use exif interface ...
0
votes
0
answers
178
views
Image still rotated after Editing Exif Data
In My app the User captures an image from the gallery or camera it is then converted to PDF, Now my problem is that images captured from the samsung devices are rotated,
I am trying to edit the exif ...
0
votes
1
answer
350
views
AndroidX ExifInterface can read camera make/model but not lens make/model
I'm building an app which reads EXIF data from images and overlays that data on the image so you can share your camera settings with a nice graphic rather than manually typing them out (EG: "F/1.4 at ...
4
votes
1
answer
4k
views
ExifInterface GPS not read on Android Q/10
I'm having the issue that Android 10 can't read GPS information from my jpeg files. The exact same files are working on Android 9.
I tried the ExifInterface (androidx) which returns null, as well as ...
1
vote
0
answers
218
views
How to detect Exif String encoding
I'm trying to get the exif of user comment using native Android API associated with ExifInterface.TAG_USER_COMMENT
this value should return a String but unfortunately seems that the String is encoded ...
4
votes
3
answers
5k
views
Android ExifInterface not saving attribute
Below is my code-
try {
InputStream inputStream = getAssets().open("thumbnail.jpg");
exifInterface = new ExifInterface(inputStream);
exifInterface.setAttribute(ExifInterface.TAG_ARTIST,"TEST ...