# GrapeCity.Documents.Imaging.GcBitmap.Load

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_GcBitmap_Load_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.Load*">Load Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_GcBitmap_Load_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.Load*"></a>
<h4 id="GrapeCity_Documents_Imaging_GcBitmap_Load_System_IO_Stream_System_Int32_System_Nullable_System_Drawing_Rectangle__" data-uid="GrapeCity.Documents.Imaging.GcBitmap.Load(System.IO.Stream,System.Int32,System.Nullable{System.Drawing.Rectangle})">Load(Stream, int, Rectangle?)</h4>
<div class="markdown level1 summary"><p>Loads the image from a stream. JPEG, PNG, WEBP, GIF, BMP, TIFF, ICO, JPEG 2000 formats are supported.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Load(Stream stream, int frameIndex = 0, Rectangle? imageRect = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(stream As Stream, Optional frameIndex As Integer = 0, Optional imageRect As Rectangle? = Nothing)</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 source stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">frameIndex</span></td>
      <td><p>Index of an image frame to read, pass 0 for image formats not supporting multiple frames.</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">imageRect</span></td>
      <td><p>Clipping rectangle of the image to be loaded.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_GcBitmap_Load_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.Load*"></a>
<h4 id="GrapeCity_Documents_Imaging_GcBitmap_Load_System_String_System_Int32_System_Nullable_System_Drawing_Rectangle__" data-uid="GrapeCity.Documents.Imaging.GcBitmap.Load(System.String,System.Int32,System.Nullable{System.Drawing.Rectangle})">Load(string, int, Rectangle?)</h4>
<div class="markdown level1 summary"><p>Loads the image from a file. JPEG, PNG, WEBP, GIF, BMP, TIFF, ICO, JPEG 2000 formats are supported.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Load(string path, int frameIndex = 0, Rectangle? imageRect = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(path As String, Optional frameIndex As Integer = 0, Optional imageRect As Rectangle? = Nothing)</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 file path to the 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">frameIndex</span></td>
      <td><p>Index of an image frame to read, pass 0 for image formats not supporting multiple frames.</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">imageRect</span></td>
      <td><p>Clipping rectangle of the image to be loaded.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_GcBitmap_Load_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.Load*"></a>
<h4 id="GrapeCity_Documents_Imaging_GcBitmap_Load_System_Byte___System_Int32_System_Nullable_System_Drawing_Rectangle__" data-uid="GrapeCity.Documents.Imaging.GcBitmap.Load(System.Byte[],System.Int32,System.Nullable{System.Drawing.Rectangle})">Load(byte[], int, Rectangle?)</h4>
<div class="markdown level1 summary"><p>Loads the image from a byte array. JPEG, PNG, WEBP, GIF, BMP, TIFF, ICO, JPEG 2000 formats are supported.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Load(byte[] bytes, int frameIndex = 0, Rectangle? imageRect = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(bytes As Byte(), Optional frameIndex As Integer = 0, Optional imageRect As Rectangle? = Nothing)</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.byte">byte</a>[]</td>
      <td><span class="parametername">bytes</span></td>
      <td><p>The image data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">frameIndex</span></td>
      <td><p>Index of an image frame to read, pass 0 for image formats not supporting multiple frames.</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">imageRect</span></td>
      <td><p>Clipping rectangle of the image to be loaded.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
