开发者

how to resize image in WP7

开发者 https://www.devze.com 2023-01-29 04:50 出处:网络
I capture an image using the photo or c开发者_运维百科amera task and I want to resize the image to say example 480x240 from the captured size of around2592x1944.

I capture an image using the photo or c开发者_运维百科amera task and I want to resize the image to say example 480x240 from the captured size of around 2592x1944. how do I do this ? thanks


You can pass the JPEG stream you get from the Completed event to the PictureDecoder.DecodeJpeg method. The second and the third parameters define the size. You will get a WriteableBitmap that can be manipulated further and saved back to the MediaLibrary. See this blog post for some example.

0

精彩评论

暂无评论...
验证码 换一张
取 消