【问题标题】:Why does OxyPlot.PngExporter.Export not export a .png file为什么 OxyPlot.PngExporter.Export 不导出 .png 文件
【发布时间】:2016-05-31 11:48:26
【问题描述】:

我尝试将Oxyplot PlotModel 导出到.png

我试过这样:

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

输出文件是 .File 类型。

【问题讨论】:

    标签: file plot export png oxyplot


    【解决方案1】:

    如果文件扩展名为 .File,则表示该文件丢失了*.png,因此 Windows 无法读取该文件。 您可以尝试像这样添加文件扩展名Stream stream = File.Create(path+ ".png");

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-03
      • 1970-01-01
      • 2019-03-25
      • 2020-06-21
      • 2022-12-17
      相关资源
      最近更新 更多