# GrapeCity.Documents.Imaging.GcBitmap.SaveAsJpeg

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_GcBitmap_SaveAsJpeg_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.SaveAsJpeg*">SaveAsJpeg Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_GcBitmap_SaveAsJpeg_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.SaveAsJpeg*"></a>
<h4 id="GrapeCity_Documents_Imaging_GcBitmap_SaveAsJpeg_System_IO_Stream_System_Nullable_System_Drawing_Rectangle__System_Int32_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.SaveAsJpeg(System.IO.Stream,System.Nullable{System.Drawing.Rectangle},System.Int32)">SaveAsJpeg(Stream, Rectangle?, int)</h4>
<div class="markdown level1 summary"><p>Saves the image into a Stream in JPEG format with specified quality (from 0 to 100).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SaveAsJpeg(Stream stream, Rectangle? clipRect = null, int quality = 95)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SaveAsJpeg(stream As Stream, Optional clipRect As Rectangle? = Nothing, Optional quality As Integer = 95)</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.int32">int</a></td>
      <td><span class="parametername">quality</span></td>
      <td><p>The image quality from 0 (best compression) to 100 (best quality).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_GcBitmap_SaveAsJpeg_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.SaveAsJpeg*"></a>
<h4 id="GrapeCity_Documents_Imaging_GcBitmap_SaveAsJpeg_System_String_System_Nullable_System_Drawing_Rectangle__System_Int32_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.SaveAsJpeg(System.String,System.Nullable{System.Drawing.Rectangle},System.Int32)">SaveAsJpeg(string, Rectangle?, int)</h4>
<div class="markdown level1 summary"><p>Saves the image to a file in JPEG format with specified quality (from 0 to 100).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SaveAsJpeg(string path, Rectangle? clipRect = null, int quality = 95)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SaveAsJpeg(path As String, Optional clipRect As Rectangle? = Nothing, Optional quality As Integer = 95)</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.int32">int</a></td>
      <td><span class="parametername">quality</span></td>
      <td><p>The image quality from 0 (best compression) to 100 (best quality).</p>
</td>
    </tr>
  </tbody>
</table>
</div>
