Windows Phone-裁剪BitmapImage [英] Windows Phone - Crop BitmapImage

查看:60
本文介绍了Windows Phone-裁剪BitmapImage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有BitmapImage,我需要将其裁剪为大小为200x200的矩形。矩形应包含源BitmapImage的中心。我建立的唯一解决方案CroppedBitmap无法在Windows Phone上使用。

I have BitmapImage and I need to crop it to a rectangle of size 200x200. The rectangle should contain the center of the source BitmapImage. The only solution I've founded, CroppedBitmap does not work Windows Phone.

另一种解决方案可能是创建WriteableBitmap并遍历每个像素,但是我没有更简单的方法了?

Another solution could be to create a WriteableBitmap and iterate through each pixel but I is there no easier way?

推荐答案

我记得在这里看到过类似问题的解决方案:

I have remembered that I have seen solution for similar issue here:

将图像分割成几块Silverlight Windows Phone

这篇关于Windows Phone-裁剪BitmapImage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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