本文介绍了无法在MediaCapture类捕获的图像上保存GPS属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我试图修改简单图像样本,以便在加载图像文件后存储GPS相关信息。

I tried to modify simple image sample to store GPS related information after image file loaded.

但是我总是得到"参数不正确"错误。

But i always get "The parameter is incorrect" error.

这是修改,请帮助检查。

Here is modification and pls help to check.

  prop [" System.GPS.Latitude"] = Windows.Foundation.PropertyValue.createDoubleArray([61,55,38]);

  file.properties.savePropertiesAsync(prop).then(function(){

 },

  function(e){

    //得到参数不正确错误;

 });
$


但是,如果我试图覆盖一个图片的属性已经有了gps属性,功能运行良好。

Tks。

  prop["System.GPS.Latitude"] = Windows.Foundation.PropertyValue.createDoubleArray([61,55,38]);
  file.properties.savePropertiesAsync(prop).then(function() {
  },
  function(e) {
    // got parameter incorrect error;
  });

however, if i tried to overwrite an image's property which have gps property already, the function works well.
Tks.

 

推荐答案

只要您使用的文件格式类型支持,您的代码就可以正常工作该属性。

Your code should work fine as long as the file format type you are using supports that property.

成功和失败案例中的文件格式类型是什么?

What is your file format type in both the successful and failed cases?

-Jeff


这篇关于无法在MediaCapture类捕获的图像上保存GPS属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 07:43