本文整理汇总了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);
}