# GrapeCity.Documents.Imaging.GcBitmap.SaveAsWebp

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_GcBitmap_SaveAsWebp_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.SaveAsWebp*">SaveAsWebp Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_GcBitmap_SaveAsWebp_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.SaveAsWebp*"></a>
<h4 id="GrapeCity_Documents_Imaging_GcBitmap_SaveAsWebp_System_IO_Stream_System_Nullable_System_Drawing_Rectangle__System_Boolean_System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.SaveAsWebp(System.IO.Stream,System.Nullable{System.Drawing.Rectangle},System.Boolean,System.Int32,System.Int32)">SaveAsWebp(Stream, Rectangle?, bool, int, int)</h4>
<div class="markdown level1 summary"><p>Saves the image into a Stream in WEBP format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SaveAsWebp(Stream stream, Rectangle? clipRect = null, bool lossless = false, int quality = 75, int method = 5)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SaveAsWebp(stream As Stream, Optional clipRect As Rectangle? = Nothing, Optional lossless As Boolean = False, Optional quality As Integer = 75, Optional method As Integer = 5)</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>The output stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a>?</td>
      <td><span class="parametername">clipRect</span></td>
      <td><p>Clipping rectangle of the image to be saved.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">lossless</span></td>
      <td><p>Either lossless (true) or lossy (false) webp 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">quality</span></td>
      <td><p>The compression quality. Between 0 and 100.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">method</span></td>
      <td><p>The encoding method to use. Its a quality/speed trade-off (0=fast, 6=slower-better).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_GcBitmap_SaveAsWebp_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.SaveAsWebp*"></a>
<h4 id="GrapeCity_Documents_Imaging_GcBitmap_SaveAsWebp_System_String_System_Nullable_System_Drawing_Rectangle__System_Boolean_System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.SaveAsWebp(System.String,System.Nullable{System.Drawing.Rectangle},System.Boolean,System.Int32,System.Int32)">SaveAsWebp(string, Rectangle?, bool, int, int)</h4>
<div class="markdown level1 summary"><p>Saves the image to a file in WEBP format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SaveAsWebp(string path, Rectangle? clipRect = null, bool lossless = false, int quality = 75, int method = 5)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SaveAsWebp(path As String, Optional clipRect As Rectangle? = Nothing, Optional lossless As Boolean = False, Optional quality As Integer = 75, Optional method As Integer = 5)</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">path</span></td>
      <td><p>The output file path.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a>?</td>
      <td><span class="parametername">clipRect</span></td>
      <td><p>Clipping rectangle of the image to be saved.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">lossless</span></td>
      <td><p>Either lossless (true) or lossy (false) webp 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">quality</span></td>
      <td><p>The compression quality. Between 0 and 100.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">method</span></td>
      <td><p>The encoding method to use. Its a quality/speed trade-off (0=fast, 6=slower-better).</p>
</td>
    </tr>
  </tbody>
</table>
</div>
