Silverlight - WriteableBitmap的跨域调用限制

Silverlight - WriteableBitmap的跨域调用限制,第1张

概述Silverlight 3中增加的WriteableBitmap 大大方便了图片编辑。最近使用了.NET Image Tools,其中很多编辑功能都是基于对WritableBitmap的 *** 作。项目中有一个Image的Source是来自不同域下的Uri,使用.NET Image Tools是遇到了一个异常"Cannnot acess Bitmap" , 搜索到一个讨论,才发现WriteableBit

Silverlight 3中增加的WriteableBitmap 大大方便了图片编辑。最近使用了.NET Image Tools,其中很多编辑功能都是基于对WritableBitmap的 *** 作。项目中有一个Image的Source是来自不同域下的Uri,使用.NET Image Tools是遇到了一个异常"Cannnot acess Bitmap",搜索到一个讨论,才发现WriteableBitmap也有跨域调用下的限制:

 

The WriteableBitmap class has a security model that restricts access to the Pixels array,if the WriteableBitmap is constructed using cross-domain content. For example,a WriteableBitmap that is constructed using a BitmAPImage referencing a URL that comes from another domain does not permit access to its Pixels array. The restriction extends to any UI element that uses a URL-derived property for setting some or all of its content. In particular,this restriction applIEs to the "Grab a frame of a running vIDeo from MediaElement" scenario. If the MediaElement.source references a vIDeo file from another domain,the WriteableBitmap created by referencing the MediaElement as the element source restricts access to the Pixels array.

总结

以上是内存溢出为你收集整理的Silverlight - WriteableBitmap的跨域调用限制全部内容,希望文章能够帮你解决Silverlight - WriteableBitmap的跨域调用限制所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1077634.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存