Android Question Question: how to modify a jpeg without losing Exif data

cb56

Member
Licensed User
Longtime User
Hi,
is there a way to edit a photo in jpeg format (eg rotate or resize it) and save it without losing EXIF data?

thanks

cb56
 

DonManfred

Expert
Licensed User
Longtime User
You will need a lib which extracts the EXIF data from original and have the possibilitiy to add EXIF data on the new image.
But i think there is no b4a-library available for this. I dont know if the b4a-libs which can convert an jpeg are able to extract/add EXIF data...

After posting my answer i saw this thread.
Install lib. extract EXIF on original and put them in a variable. convert the image to new size (whatever) and then write EXIF back to the newly created JPG
 
Upvote 0

cb56

Member
Licensed User
Longtime User
I was afraid of this answer, I tried it with JpegUtils but I can extract a key at a time ... and are not available all the keys provided.

Does anyone have any suggestion, perhaps with reflection by calling the native APIs?

@DonManfred: thanks, I've read thread...
 
Last edited:
Upvote 0
Top