【发布时间】:2013-10-22 17:51:09
【问题描述】:
我正在尝试在 Windows phone 8 中创建一个带有“缩略图”图像的视频捕获应用程序商店视频文件。我从以下链接中得到了一些提示: How to get the thumbnail of a recorded video - windows phone 8?。 但结果很烦人。我觉得这个功能有问题。
void captureSource_CaptureImageCompleted(object sender, CaptureImageCompletedEventArgs e)
{
using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
{
WriteableBitmap wb = e.Result;
string fileName = "CameraMovie.jpg";
if (isoStore.FileExists(fileName))
isoStore.DeleteFile(fileName);
IsolatedStorageFileStream file = isoStore.CreateFile(fileName);
Extensions.SaveJpeg(wb, file, wb.PixelWidth, wb.PixelHeight, 0, 85);
file.Close();
captureSource.Stop();
fileSink.CaptureSource = null;
fileSink.IsolatedStorageFileName = null;
}
}
e.Result 中有一些无效数据。当我将它绑定到图像控件时,它会显示一些烦人的图像。 请任何人帮助我。
【问题讨论】:
标签: windows-phone-8