C# MediaLibrary.SavePicture以降低的分辨率保存图片流

C# MediaLibrary.SavePicture以降低的分辨率保存图片流,c#,silverlight,windows-phone-7,stream,cameracapturetask,C#,Silverlight,Windows Phone 7,Stream,Cameracapturetask,我构建了一个应用程序,允许用户捕获图像,然后将其保存到独立存储和手机媒体库中 当我将这两张图片下载到我的电脑上时,我看到保存在独立存储中的图片分辨率为2592x1944像素和262 dpi,而保存在媒体库中的图片分辨率为1222x1630和72 dpi。我无法解释为什么会发生这种情况。我的相关代码是: //Save image to isolated storage Extensions.SaveJpeg(wb, fileStream, wb.PixelWidth, wb.PixelHeight

我构建了一个应用程序,允许用户捕获图像,然后将其保存到独立存储和手机媒体库中

当我将这两张图片下载到我的电脑上时,我看到保存在独立存储中的图片分辨率为2592x1944像素和262 dpi,而保存在媒体库中的图片分辨率为1222x1630和72 dpi。我无法解释为什么会发生这种情况。我的相关代码是:

//Save image to isolated storage
Extensions.SaveJpeg(wb, fileStream, wb.PixelWidth, wb.PixelHeight, 0, 85);

//Save image to Media Library
MediaLibrary medialibrary = new MediaLibrary();
medialibrary.SavePicture(imageName, e.ChosenPhoto;);

(wb是从e.ChosenPhoto创建的可写位图)

我认为它与从ChosenPhoto而不是从可写位图保存有关。尝试将图片保存到媒体库


我实现了这一点,结果是媒体库中的图像仍然是1222x1630,但dpi有所改进:165 dpi。很奇怪,不是吗?
// Encode WriteableBitmap object to a JPEG stream.
Extensions.SaveJpeg(wb, fileStream, wb.PixelWidth, wb.PixelHeight, 0, 85);
fileStream.Close();

// Create a new stream from isolated storage, and save the JPEG file to the media library on Windows Phone.
fileStream = store.OpenFile(tempJPEG, FileMode.Open, FileAccess.Read);

MediaLibrary mediaLibrary = new MediaLibrary();
Picture pic = mediaLibrary.SavePicture("savedflimage.jpg", fileStream);
fileStream.Close();