如何在Xamarin for Android中设置jpeg文件的属性? [英] How do I set properties of jpeg file in Xamarin for Android?

查看:135
本文介绍了如何在Xamarin for Android中设置jpeg文件的属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jpeg文件,当我在Windows(右键单击->属性)下查看jpeg文件的详细信息时,在详细信息"选项卡下有标题",主题",等级",标签",注释"等条目. 如何在Xamarin(Android)中设置这些属性? 谢谢.

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, Rating, Tags, Comments, etc. How can I set these properties in Xamarin (Android)? Thanks.

推荐答案

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

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

这篇关于如何在Xamarin for Android中设置jpeg文件的属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆