(译)Nokia Imaging SDK — 分享图片到在线服务

From Nokia Developer Wiki
Jump to: navigation, search


WP Metro Icon Web.png
SignpostIcon XAML 40.png
WP Metro Icon WP8.png
Article Metadata

SDK: Windows Phone 8.0 SDK, Nokia Imaging SDK Beta 1

段博琼 在 11 Oct 2013 创建
最后由 hamishwillee 在 17 Oct 2013 编辑

当把图片分享到在线服务上时,你需要和保存图片一样的方式来缩小图片的尺寸。并且 ShareMediaTask 同时需要你分享的 图片必须保存在图片库中,所以当你分享图片前必须把它首先保存到图片库除非你已经保存过了(或者图片的来源不是图片库)

 using Microsoft.Phone.Tasks;
public partial class PreviewPage : PhoneApplicationPage
private ShareMediaTask _shareMediaTask = new ShareMediaTask ();
private string _libraryPath = null;
private async void Share(IBuffer image)
if (_libraryPath == null)
// Saving the photo may throw an exception, for example, if there is not free disk space available
_libraryPath = await Utilities.SaveAsync(image);
catch (Exception ex)
_shareMediaTask.FilePath = _libraryPath;

Version Hint

Windows Phone: [[Category:Windows Phone]]
[[Category:Windows Phone 7.5]]
[[Category:Windows Phone 8]]

Nokia Asha: [[Category:Nokia Asha]]
[[Category:Nokia Asha Platform 1.0]]

Series 40: [[Category:Series 40]]
[[Category:Series 40 1st Edition]] [[Category:Series 40 2nd Edition]]
[[Category:Series 40 3rd Edition (initial release)]] [[Category:Series 40 3rd Edition FP1]] [[Category:Series 40 3rd Edition FP2]]
[[Category:Series 40 5th Edition (initial release)]] [[Category:Series 40 5th Edition FP1]]
[[Category:Series 40 6th Edition (initial release)]] [[Category:Series 40 6th Edition FP1]] [[Category:Series 40 Developer Platform 1.0]] [[Category:Series 40 Developer Platform 1.1]] [[Category:Series 40 Developer Platform 2.0]]

Symbian: [[Category:Symbian]]
[[Category:S60 1st Edition]] [[Category:S60 2nd Edition (initial release)]] [[Category:S60 2nd Edition FP1]] [[Category:S60 2nd Edition FP2]] [[Category:S60 2nd Edition FP3]]
[[Category:S60 3rd Edition (initial release)]] [[Category:S60 3rd Edition FP1]] [[Category:S60 3rd Edition FP2]]
[[Category:S60 5th Edition]]
[[Category:Symbian^3]] [[Category:Symbian Anna]] [[Category:Nokia Belle]]

Nokia Wiki 原文链接http://developer.nokia.com/Resources/Library/Lumia/#!imaging/working-with-high-resolution-photos/sharing-photos-to-online-services.html

This page was last modified on 17 October 2013, at 00:43.
90 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.