# C1.Util.DX.WIC.Bitmap.New

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_WIC_Bitmap_New_" data-uid="C1.Util.DX.WIC.Bitmap.New*">New Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_WIC_Bitmap_New_" data-uid="C1.Util.DX.WIC.Bitmap.New*"></a>
<h4 id="C1_Util_DX_WIC_Bitmap_New__1_C1_Util_DX_WIC_ImagingFactory_System_Int32_System_Int32_System_Guid___0___System_Int32_" data-uid="C1.Util.DX.WIC.Bitmap.New``1(C1.Util.DX.WIC.ImagingFactory,System.Int32,System.Int32,System.Guid,``0[],System.Int32)">New&lt;T&gt;(ImagingFactory, int, int, Guid, T[], 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 an array of pixel datas.</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 New&lt;T&gt;(ImagingFactory factory, int width, int height, Guid pixelFormat, T[] pixelDatas, int stride = 0) where T : struct</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function [New](Of T As Structure)(factory As ImagingFactory, width As Integer, height As Integer, pixelFormat As Guid, pixelDatas As T(), Optional stride 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>T[]</td>
      <td><span class="parametername">pixelDatas</span></td>
      <td><p>The pixel datas.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">stride</span></td>
      <td><p>Stride of a row of pixels (number of bytes per row). By default the stride is == 0, and calculated by taking the sizeof(T) * width.</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>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
