问题描述:

I've created an app that lets the user draw a picture onto a Canvas. I would like the user to also be able to save that drawing to his Media Library. I've looked up info on IsolatedStorage but that's not exactly what I want, or am I wrong?

Thanks.

网友答案:

You can render you canvas to a WriteableBitmap

var bitmap = new WriteableBitmap(400, 400);
bitmap.Render(canvas, null);
bitmap.Invalidate();

You can then encode this as a JPEG and save to isolated storage as described in this blog post.

网友答案:

Use the MediaLibrary SavePictureToCameraRoll method. See this article for a full exmaple: http://msdn.microsoft.com/en-us/library/ff769549(v=VS.92).aspx

相关阅读:
Top