views:

16

answers:

1

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 WritableBitmap.

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

A: 

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.

Rene Schulte