Code
1using (FileStream fs = new FileStream(path, FileMode.Create))
2{
3 JpegBitmapEncoder encoder = new JpegBitmapEncoder();
4 encoder.Frames.Add(BitmapFrame.Create(this.ImageSource));
5 encoder.QualityLevel = 80;
6 encoder.Save(fs);
7 fs.Flush();
8}
1using (FileStream fs = new FileStream(path, FileMode.Create))
2{
3 JpegBitmapEncoder encoder = new JpegBitmapEncoder();
4 encoder.Frames.Add(BitmapFrame.Create(this.ImageSource));
5 encoder.QualityLevel = 80;
6 encoder.Save(fs);
7 fs.Flush();
8}