简体   繁体   English

如何在Windows Phone 7上将BitmapImage的大小调整为50x50?

[英]How do I resize a BitmapImage to 50x50 on Windows Phone 7?

I need to resize a BitmapImage to 50x50 before uploading it to my server. 在将BitmapImage上传到我的服务器之前,我需要将其重新调整为50x50。 How do I do this on Windows Phone 7 with Silverlight C# .NET on the latest SDK 7.5? 如何在最新的SDK 7.5上使用Silverlight C#.NET在Windows Phone 7上执行此操作?

Try this 尝试这个

WriteableBitmap wBitmap = new WriteableBitmap(yourBitmapImage);

MemoryStream ms = new MemoryStream();

wBitmap.SaveJpeg(ms, 50, 50, 0, 100);

The stream will contain your resized image 该流将包含您调整大小的图像

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

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