Sub ContentChooser_Result( Success As Boolean, Dir As String, FileName As String )
Dim tempbitmap As Bitmap
Dim out As OutputStream
If Success = True Then
ImageView1.SetBackgroundImage( Null )
LoadMap( Dir, FileName ) ' this scales the picture and places it in ImageView1 on the screen
tempbitmap = ImageView1.Bitmap
out = File.OpenOutput( Starter.AppFolder, "Test.png", False ) ' create the output stream
tempbitmap.WriteToStream(out, 100, "PNG") ' save the bitmap as a png file
out.Close
' here save file location (Starter.AppFolder, "Test.png") for next time the app is started
Else
ToastMessageShow( "Getting filename failed", False )
End If
End Sub ' cc_Result()