Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MediaLibrary.SavePicture Method

Saves the image to the media library.

NameDescription
MediaLibrary.SavePicture (String, Byte[])Saves the image to the media library, and then returns that saved image as a picture object.
MediaLibrary.SavePicture (String, Stream)Saves the image contained in the stream object to the media library, and then returns that saved image as a picture object.

Exception typeCondition
InvalidOperationException Exception that is thrown if SavePicture is called while the user is tethered to a computer running Zune client software.

SavePicture is only supported on Windows Phone hardware. The Windows Phone emulator does not support SavePicture.

Capabilities for Windows Phone

If you use this API in your Windows Phone app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_MEDIALIB_PHOTOWindows Phone 8
ID_CAP_MEDIALIBWindows Phone OS 7.1

For more info, see App capabilities and hardware requirements for Windows Phone.

Community Additions

Show:
© 2017 Microsoft