简体   繁体   English

如何调整WriteableBitmap的像素大小(windows store c#)

[英]How to resize pixel of WriteableBitmap (windows store c#)

I searched in many forums and I didn't get what I want. 我在很多论坛上搜索过,但是我得不到我想要的东西。

My question is clear and simple : How to resize pixel of WriteableBitmap , for example from 300*300 to 500*500 我的问题很简单:如何调整WriteableBitmap的像素大小,例如从300 * 300到500 * 500

Look at the WritableBitmapEx project. 查看WritableBitmapEx项目。 You can use it or learn how to resize your image. 您可以使用它或学习如何调整图像大小。 It is easy to do it by using WritableBitmapEx extensions methods. 使用WritableBitmapEx扩展方法很容易做到这一点。

// Resizes the WriteableBitmap to 200px wide and 300px high using a bilinear interpolation method
var resized = writeableBmp.Resize(200, 300, WriteableBitmapExtensions.Interpolation.Bilinear);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM