views:

75

answers:

2

Hi,

I would like to know if there is any other way than using WriteableBitmap to convert the current screen into array of bytes.

Because I am trying to get a screenshot of Esri map, but I am getting "pixel access not allowed" error.

Please help.

Thanks,

A: 

There is no other way from with in Silverlight to capture the screen. You will need support from external tools to acheive this.

AnthonyWJones
A: 

I had the same problem with ESRI--we were trying to print a map. You can't access the pixels in the image because of cross-site security. If you are hosting the silverlight app on the same server as the ESRI ARCServer, you should have no problem.

There is a printing example on the ESRI samples web site and it works like a charm, but it is because the app and the images are on the same server.

What I ended up doing was totally haxor, but it worked. I used an ashx handler like a proxie to get the base map image that I needed, then drew on top of that image.

Muad'Dib
Yeah I found such printing examples on the ESRI samples, but you are right. the app and the images are on the same server. Could you elaborate ashx handler (or any good examples)? I need to draw some images on the top of map. Were you able to draw on a certain intersection or a road easily?? how about I disable cross-domain policy? Thanks for your help Muad'Dib
Jin
i was loading using a webclient to send an http request for the map area i wanted, then using a shapefile to draw on top of the returned image. [here](http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx) is an article about the cross-domain stuff.
Muad'Dib