如何在Xamarin for Android中设置jpeg文件的属性?

时间:2014-09-12 08:05:50

标签: c# xamarin jpeg exif

我正在使用jpeg文件,当我查看windows下的jpeg文件的详细信息(右键单击 - >属性)时,在Details选项卡下有Title,Subject,Rating,Tags,Comments,等等 如何在Xamarin(Android)中设置这些属性? 感谢。

2 个答案:

答案 0 :(得分:2)

以下是一些指导您的代码。

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();

答案 1 :(得分:0)

您可以使用Android.Media.ExifInterface在Xamarin.Android中获取/设置Exif属性。

http://developer.android.com/reference/android/media/ExifInterface.html

相关问题