How to copy Exif data from one image to another?

WillAutioItrax 201 Reputation points
2022-05-19T19:27:20.817+00:00

In Xamarin Forms I take a picture. At this point it has Exif information.
Then I need to rotate it and reduce it's size. Now it has lost most of it's Exif information.

Is there a way in Xamarin Forms to read the Exif data from the original image and copy most of it to the final image? Can it be done without resorting to native code?

Thanks!

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,571 Reputation points Microsoft Vendor
    2022-05-20T07:17:05.74+00:00

    Hello,​

    Is there a way in Xamarin Forms to read the Exif data from the original image and copy most of it to the final image? Can it be done without resorting to native code?

    No, I cannot Forms Api to read the Exif data. But I found the native platform Api to get/set Exif data.

    For Android, you can get/set Exif data by Android.Media.ExifInterface Api

    For iOS, you can use kCGImagePropertyExifDictionary to achieve it.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful