开发者

WPF or DirectX for panning and zooming a 5000x5000 picture?

my current code is normal WPF with a custom image view. I need to pan and zoom a very high resolution picture but of course it needs a l开发者_运维百科ot of CPU-Power to do this.

My question is: if I change the control from a image view to something like directX will this increase my zoom and panning expirience a lot or isnt there such a big difference? (The graphic card we use is a Nvidia ion2 and the CPU is a intel atom with up to 2 Ghz)


2D acceleration is not as perfected as 3D is. See benchmarks here. I believe using the picture as a texture and controlling the camera for pan and zoom should increase performance a lot.


From my knowledge WPF uses DirectX to render its content, so I wouldn't think that would give you a high performance boost.

If you're having performance issues I would think the answer is in looking through your caching algorythm.


WPF graphics isn't very powerful. We have made all graphics rendering in Direct3D9, and only displaying the 3D scene in D3DImage control.

When talking about large bitmap rendering, we've found the best way is to create a Direct3D texture. The creating of it reasonably fast, and rendering itself is very fast when the image dimensions is less than natively supported by the GPU (caps.MaxTextureWidth, caps.MaxTextureHeight). That typically is 8k x 8k or 16k x 16k. Talking about bitmaps of hundreds of MB, and should be sufficient for your use too.

To see the performance that can be obtained with it, you can download our Chart control, set a large bitmap to background image to a Geographic map. Then you see also how fast is it too zoom & pan etc. Beats WPF built-in image handling for sure :-)

(I'm one of LightningChart developers at Arction)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜