Add the frame to a Picture
Hi, all
I found many picture processing apps in windows phone store. And most of them were able to add a frame to the picture and dynamically changed it. I'd like to implement a similarly feature in my app. After checking files in Google, I typed the following code:
[CODE] <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Grid.Background>
<ImageBrush ImageSource="/frame.jpg"/>
</Grid.Background>-->
<Canvas x:Name="picCanvas" Width="456" >
<Image x:Name="picImage" Width="456" />
</Canvas>
</Grid>[/CODE]
As the coded showed. I add a background for the Grid as a picture frame. And I also could change the backgroud dynamically. Seemed like work well. But unfortuenately, I have no idea on saving the framed picture. I used the WriteableBitmap(UIElement element, Transform transform) method saved the framed picture like this:
[CODE]WriteableBitmap framedPicture = new WriteableBitmap(ContentPanel,null);[/CODE]
but the saved picture was smaller on size. e.g:The original picture was 800*600, the saved pic was 456*386.
What's wrong? Could any one give me a help?
Regards!
Re: Add the frame to a Picture
Hi
check[URL="https://www.developer.nokia.com/Community/Wiki/How_to_capture_screen_programmatically_in_Windows_Phone_7"] this wiki[/URL] -- you can specify the bitmap size while instantiating WriteableBitmap