【问题标题】:System.ArgumentException when calling MediaLibrary.SavePicture()调用 MediaLibrary.SavePicture() 时出现 System.ArgumentException
【发布时间】:2011-01-30 22:35:30
【问题描述】:

我的代码如下所示:

String filename = Utils.GetNextFilename();
MediaLibrary library = new MediaLibrary();
library.SavePicture(filename, corrected_image);

SavePicture() 通话中,我得到以下信息:

未处理的类型异常 'System.ArgumentException' 发生在 Microsoft.Xna.Framework.dll

附加信息:价值不 在预期范围内。

但我不知道为什么。

【问题讨论】:

    标签: silverlight exception windows-phone-7 xna media-library


    【解决方案1】:

    好的,我想通了。我必须重置流:

    String filename = Utils.GetNextFilename();
    MediaLibrary library = new MediaLibrary();
    corrected_image.Seek(0, 0);                      // <-- The fix.
    library.SavePicture(filename, corrected_image);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-11
      • 1970-01-01
      • 1970-01-01
      • 2015-10-12
      • 1970-01-01
      • 1970-01-01
      • 2015-06-25
      相关资源
      最近更新 更多