Taking a picture with AR object

Jul 23, 2011 at 4:35 PM

hi,I want to take picture in slar,and I had modified BeginnersGuide sample with this website's sample.

http://wildermuth.com/2009/11/23/Taking_a_WebCam_Photo_with_Silverlight

But the result picture is no AR object.How can I take a picture that result with AR object?


and here is my test example (no ar object one)

http://bit.ly/r4aW0w

Coordinator
Jul 23, 2011 at 6:31 PM

You need to render the Grid that contains the rectangle (viewport) and the AR object (TextBox).

In the XAML give the Grid a Name:

<Grid Name="VpContainer" Width="640" Height="480">
	<Rectangle Name="Viewport" Stroke="Black" StrokeThickness="2" />
	<Canvas>
		<TextBox Name="Txt" Text="Silverlight 4 rockz!" Width="300" Height="300" TextWrapping="Wrap" AcceptsReturn="True" FontSize="16" />
	</Canvas>
</Grid>

In C# render the Grid to a WriteableBitmap, which you can save then:

var wb = new WriteableBitmap(VpContainer, null);
// Save the wb WriteableBitmap as Jpeg or whatever to a file

Find more details in my relevant blog posts, like this one: http://kodierer.blogspot.com/2009/11/edgecam-shots-saving-silverlight-4.html

 

- Rene Schulte

Aug 19, 2011 at 9:23 AM

thanks you . I have solved it