How do I set properties of jpeg file in Xamarin for Android?

前端 未结 2 706
梦谈多话
梦谈多话 2021-01-17 05:21

I am working with jpeg files, when I look at the details of a jpeg file under windows (right-click->properties), under the Details tab there are entries for Title, Subject,

2条回答
  •  温柔的废话
    2021-01-17 05:48

    Here is some code to guide you.

    ExifInterface newExif= new ExifInterface(filePath);
    newExif.SetAttribute(ExifInterface.TagGpsLatitude, "teste lat");
    newExif.SetAttribute(ExifInterface.TagGpsLatitudeRef, "teste lat ref");
    newExif.SetAttribute(ExifInterface.TagGpsLongitude, "teste long");
    newExif.SetAttribute(ExifInterface.TagGpsLongitudeRef, "teste long ref");
    newExif.SaveAttributes();
    

提交回复
热议问题