# C1.Util.DX.Direct2D.Bitmap.New

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct2D_Bitmap_New_" data-uid="C1.Util.DX.Direct2D.Bitmap.New*">New Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct2D_Bitmap_New_" data-uid="C1.Util.DX.Direct2D.Bitmap.New*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_New__1_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_Size2L___0___C1_Util_DX_Direct2D_BitmapProperties_" data-uid="C1.Util.DX.Direct2D.Bitmap.New``1(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.Size2L,``0[],C1.Util.DX.Direct2D.BitmapProperties)">New&lt;T&gt;(RenderTarget, Size2L, T[], BitmapProperties)</h4>
<div class="markdown level1 summary"><p>Creates a Direct2D bitmap from a pointer to in-memory source data.</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;(RenderTarget renderTarget, Size2L size, T[] pixelDatas, BitmapProperties bitmapProperties) where T : struct</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function [New](Of T As Structure)(renderTarget As RenderTarget, size As Size2L, pixelDatas As T(), bitmapProperties As BitmapProperties) 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.Direct2D.RenderTarget.html">RenderTarget</a></td>
      <td><span class="parametername">renderTarget</span></td>
      <td><p>an instance of <a class="xref" href="C1.Util.DX.Direct2D.RenderTarget.html">RenderTarget</a></p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Size2L.html">Size2L</a></td>
      <td><span class="parametername">size</span></td>
      <td><p>The dimension of the bitmap to create in pixels.</p>
</td>
    </tr>
    <tr>
      <td>T[]</td>
      <td><span class="parametername">pixelDatas</span></td>
      <td><p>A pointer to an array of pixel data. The size of the array must be equal to sizeof(pixel) * Size.Width * Height.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.BitmapProperties.html">BitmapProperties</a></td>
      <td><span class="parametername">bitmapProperties</span></td>
      <td><p>The pixel format and dots per inch (DPI) of the bitmap to create.</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.Direct2D.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>
