开发者

Fastest way to draw a bitmap?

开发者 https://www.devze.com 2023-04-10 09:22 出处:网络
I\'m working on a timelapse application and that requires drawing new frame every 30ms. Frames are stored in isolated storage (they are 640x480).

I'm working on a timelapse application and that requires drawing new frame every 30ms. Frames are stored in isolated storage (they are 640x480).

I tried loading them into MemoryStream first, and then convert to BitmapImage and assign as a Source for the Image control. But it's too long - it takes about 55ms. I measured and it's not reading from isolated storage, it's actually loading image into Image control that take the long开发者_开发技巧est.

Is there any way to draw images faster on windows phone with silverlight or should I consider doing so with XNA?


Take a look at the WriteableBitmap class and the open source library WritableBitmapEx. The Blit method within WriteableBitmapEx will copy one bitmap into another. Not sure if it's fast enough for what you need, but it is very fast for what I'm doing with it.

0

精彩评论

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