# C1.Util.DX.WIC.Bitmap.Create

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_WIC_Bitmap_Create_" data-uid="C1.Util.DX.WIC.Bitmap.Create*">Create Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_WIC_Bitmap_Create_" data-uid="C1.Util.DX.WIC.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_WIC_Bitmap_Create_C1_Util_DX_WIC_ImagingFactory_System_Int32_System_Int32_System_Guid_C1_Util_DX_WIC_BitmapCreateCacheOption_" data-uid="C1.Util.DX.WIC.Bitmap.Create(C1.Util.DX.WIC.ImagingFactory,System.Int32,System.Int32,System.Guid,C1.Util.DX.WIC.BitmapCreateCacheOption)">Create(ImagingFactory, int, int, Guid, BitmapCreateCacheOption)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.WIC.Bitmap.html">Bitmap</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Bitmap Create(ImagingFactory factory, int width, int height, Guid pixelFormat, BitmapCreateCacheOption option)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(factory As ImagingFactory, width As Integer, height As Integer, pixelFormat As Guid, [option] As BitmapCreateCacheOption) As Bitmap</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="C1.Util.DX.WIC.ImagingFactory.html">ImagingFactory</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>The factory.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The width.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The height.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a></td>
      <td><span class="parametername">pixelFormat</span></td>
      <td><p>The pixel format. <a class="xref" href="C1.Util.DX.WIC.PixelFormat.html">PixelFormat</a> for a list of valid formats.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.WIC.BitmapCreateCacheOption.html">BitmapCreateCacheOption</a></td>
      <td><span class="parametername">option</span></td>
      <td><p>The option.</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="C1.Util.DX.WIC.Bitmap.html">Bitmap</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_WIC_Bitmap_Create_" data-uid="C1.Util.DX.WIC.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_WIC_Bitmap_Create_C1_Util_DX_WIC_ImagingFactory_System_Int32_System_Int32_System_Guid_C1_Util_DX_DataRectangle_System_Int32_" data-uid="C1.Util.DX.WIC.Bitmap.Create(C1.Util.DX.WIC.ImagingFactory,System.Int32,System.Int32,System.Guid,C1.Util.DX.DataRectangle,System.Int32)">Create(ImagingFactory, int, int, Guid, DataRectangle, int)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.WIC.Bitmap.html">Bitmap</a> class from a memory location using <a class="xref" href="C1.Util.DX.DataRectangle.html">DataRectangle</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Bitmap Create(ImagingFactory factory, int width, int height, Guid pixelFormat, DataRectangle dataRectangle, int totalSizeInBytes = 0)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(factory As ImagingFactory, width As Integer, height As Integer, pixelFormat As Guid, dataRectangle As DataRectangle, Optional totalSizeInBytes As Integer = 0) As Bitmap</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="C1.Util.DX.WIC.ImagingFactory.html">ImagingFactory</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>The factory.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The width.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The height.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a></td>
      <td><span class="parametername">pixelFormat</span></td>
      <td><p>The pixel format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataRectangle.html">DataRectangle</a></td>
      <td><span class="parametername">dataRectangle</span></td>
      <td><p>The data rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">totalSizeInBytes</span></td>
      <td><p>Size of the buffer in dataRectangle. If == 0, calculate the size automatically based on the height and row pitch.</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="C1.Util.DX.WIC.Bitmap.html">Bitmap</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_WIC_Bitmap_Create_" data-uid="C1.Util.DX.WIC.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_WIC_Bitmap_Create_C1_Util_DX_WIC_ImagingFactory_C1_Util_DX_WIC_BitmapSource_C1_Util_DX_WIC_BitmapCreateCacheOption_" data-uid="C1.Util.DX.WIC.Bitmap.Create(C1.Util.DX.WIC.ImagingFactory,C1.Util.DX.WIC.BitmapSource,C1.Util.DX.WIC.BitmapCreateCacheOption)">Create(ImagingFactory, BitmapSource, BitmapCreateCacheOption)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.WIC.Bitmap.html">Bitmap</a> class from a <a class="xref" href="C1.Util.DX.WIC.BitmapSource.html">BitmapSource</a></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Bitmap Create(ImagingFactory factory, BitmapSource bitmapSource, BitmapCreateCacheOption option)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(factory As ImagingFactory, bitmapSource As BitmapSource, [option] As BitmapCreateCacheOption) As Bitmap</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="C1.Util.DX.WIC.ImagingFactory.html">ImagingFactory</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>The factory.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.WIC.BitmapSource.html">BitmapSource</a></td>
      <td><span class="parametername">bitmapSource</span></td>
      <td><p>The bitmap source ref.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.WIC.BitmapCreateCacheOption.html">BitmapCreateCacheOption</a></td>
      <td><span class="parametername">option</span></td>
      <td><p>The option.</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="C1.Util.DX.WIC.Bitmap.html">Bitmap</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_WIC_Bitmap_Create_" data-uid="C1.Util.DX.WIC.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_WIC_Bitmap_Create_C1_Util_DX_WIC_ImagingFactory_C1_Util_DX_WIC_BitmapSource_C1_Util_DX_RectL_" data-uid="C1.Util.DX.WIC.Bitmap.Create(C1.Util.DX.WIC.ImagingFactory,C1.Util.DX.WIC.BitmapSource,C1.Util.DX.RectL)">Create(ImagingFactory, BitmapSource, RectL)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.WIC.Bitmap.html">Bitmap</a> class from a <a class="xref" href="C1.Util.DX.WIC.BitmapSource.html">BitmapSource</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Bitmap Create(ImagingFactory factory, BitmapSource bitmapSource, RectL rectangle)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(factory As ImagingFactory, bitmapSource As BitmapSource, rectangle As RectL) As Bitmap</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="C1.Util.DX.WIC.ImagingFactory.html">ImagingFactory</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>The factory.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.WIC.BitmapSource.html">BitmapSource</a></td>
      <td><span class="parametername">bitmapSource</span></td>
      <td><p>The bitmap source.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.RectL.html">RectL</a></td>
      <td><span class="parametername">rectangle</span></td>
      <td><p>The rectangle.</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="C1.Util.DX.WIC.Bitmap.html">Bitmap</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
