Reputation: 431
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.
Upvotes: 0
Views: 1182
Reputation: 65
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");
Upvotes: 1