0

I try to export an Oxyplot PlotModel to .png

I tried like so:

Stream stream = File.Create(path);
var pngExporter = new PngExporter { Width = 600, Height = 400, Background = OxyColors.White };
PngExporter.Export(this.PlotModel, stream, 800, 600);

The output file is a .File type.

enter image description here

Georgiana M
  • 323
  • 4
  • 20

1 Answers1

1

If the file extension is .File, it means the file is missing *.png and is therefore not readable by windows. You could try adding the file extension like this Stream stream = File.Create(path+ ".png");