开发者

How to read pixel values in Silverlight Image control?

Is it possible to read pixel values from an Image control in Silverlight 4 without copying Image pixels into a WritableBitmap? I know how to do that with the Wr开发者_如何学GoitableBitmap.

I would like to read the value of a pixel my mouse is over.

I can track my mouse move over the loaded image in the Image control reading relevant XY coordinates. I would like to avoid allocating a WritableBitmap object and do the expensive pix copy.

Thanks for suggestions. V


No, it's not possible.

You can render the Image once in the MouseButtonDown event and use the rendered bitmap in the MouseMove event to get better performance.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜