本文整理匯總了C#中System.Windows.Media.Imaging.BitmapSource.Save方法的典型用法代碼示例。如果您正苦於以下問題:C# BitmapSource.Save方法的具體用法?C# BitmapSource.Save怎麽用?C# BitmapSource.Save使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Media.Imaging.BitmapSource
的用法示例。
在下文中一共展示了BitmapSource.Save方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: captureImage
private string captureImage(BitmapSource image)
{
cameraFlash = new Rectangle();
cameraFlash.Height = 800;
cameraFlash.Width = 800;
cameraFlash.Fill = new SolidColorBrush(Colors.White);
cameraFlash.Name = "cameraFlash";
this.RegisterName(cameraFlash.Name, cameraFlash);
DoubleAnimation da = new DoubleAnimation();
da.From = 1.0;
da.To = 0.0;
da.Duration = new Duration(TimeSpan.FromSeconds(1));
flashStoryboard = new Storyboard();
flashStoryboard.Children.Add(da);
Storyboard.SetTargetName(da, cameraFlash.Name);
Storyboard.SetTargetProperty(da, new PropertyPath(Rectangle.OpacityProperty));
cameraFlash.Loaded += new RoutedEventHandler(cameraFlash_Loaded);
MainCanvas.Children.Add(cameraFlash);
flashStoryboard.Completed += new EventHandler(flashStoryboard_Completed);
MainWindow.SFXCamera.Play();
string imageAddress = "moto-" + DateTime.Now.ToString("ddMMyyyy-HHmmss") + ".jpg";
image.Save(imageAddress, ImageFormat.Jpeg);
return imageAddress;
}
示例2: updateImages
public void updateImages(BitmapSource newFrame)
{
newFrame.Save(imageFramePath(skeletons.Count), Coding4Fun.Kinect.Wpf.ImageFormat.Jpeg);
}