# C1.WinUI.Chart.FlexChartBase.SaveImage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WinUI_Chart_FlexChartBase_SaveImage_" data-uid="C1.WinUI.Chart.FlexChartBase.SaveImage*">SaveImage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WinUI_Chart_FlexChartBase_SaveImage_" data-uid="C1.WinUI.Chart.FlexChartBase.SaveImage*"></a>
<h4 id="C1_WinUI_Chart_FlexChartBase_SaveImage_Windows_Storage_Streams_IRandomAccessStream_C1_WinUI_Chart_ImageFormat_System_Int32_System_Int32_System_Nullable_Windows_UI_Color__" data-uid="C1.WinUI.Chart.FlexChartBase.SaveImage(Windows.Storage.Streams.IRandomAccessStream,C1.WinUI.Chart.ImageFormat,System.Int32,System.Int32,System.Nullable{Windows.UI.Color})">SaveImage(IRandomAccessStream, ImageFormat, int, int, Color?)</h4>
<div class="markdown level1 summary"><p>Saves chart as image with to the specified stream.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Task SaveImage(IRandomAccessStream stream, ImageFormat fmt, int w = 0, int h = 0, Color? backColor = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SaveImage(stream As IRandomAccessStream, fmt As ImageFormat, Optional w As Integer = 0, Optional h As Integer = 0, Optional backColor As Color? = Nothing) As Task</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">IRandomAccessStream</span></td>
      <td><span class="parametername">stream</span></td>
      <td><p>Stream</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WinUI.Chart.ImageFormat.html">ImageFormat</a></td>
      <td><span class="parametername">fmt</span></td>
      <td><p>Image format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">w</span></td>
      <td><p>Width of image.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">h</span></td>
      <td><p>Height of image</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Color</span>?</td>
      <td><span class="parametername">backColor</span></td>
      <td><p>The background of image.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
