How to save graphicslayer content to an image

756
2
03-05-2012 07:21 AM
Labels (1)
YanfengGong
New Contributor
Can anyone share your inputs on how to save the updated graphicslayer content together with the base map into an image, for example a PNG file in WPF applications? Or is it possible to do so? I thought it was a common task. And I am surprised to realize that I couldn't find any working example to achieve this task.
0 Kudos
2 Replies
ShaunWeston
Occasional Contributor
I'm just looking into how to do this now for my application which will require an export to PDF/JPEG option for printing. Couldn't find any direct samples, but I think the way to do it would be through a geoprocessing task using ArcPy? I can see a few samples where you can export to JSON from the WPF application and in the new 10.1 ArcPy library I believe there is a way of transforming JSON into an MXD, so I think that's the way to do it, but will keep exploring.
0 Kudos
BKuiper
Occasional Contributor III
I did something similar for a previous project were I used the WritableBitmap to create a image that then can be exported as file or into a PDF.

the problem was that I had to put it into a Map control and that the graphicslayer had to be loaded before i could succesfully call WriteableBitmap. Hope this will get you on your way.
0 Kudos