# C1.Util.DX.Direct2D.Bitmap.Create

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*">Create Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_Size2L_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.Size2L)">Create(RenderTarget, Size2L)</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 Create(RenderTarget renderTarget, Size2L size)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, size As Size2L) 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>
  </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>


<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_Size2L_C1_Util_DX_Direct2D_BitmapProperties_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.Size2L,C1.Util.DX.Direct2D.BitmapProperties)">Create(RenderTarget, Size2L, 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 Create(RenderTarget renderTarget, Size2L size, BitmapProperties bitmapProperties)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, size As Size2L, 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><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>


<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_Size2L_C1_Util_DX_DataPointer_System_Int32_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.Size2L,C1.Util.DX.DataPointer,System.Int32)">Create(RenderTarget, Size2L, DataPointer, int)</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 Create(RenderTarget renderTarget, Size2L size, DataPointer dataPointer, int pitch)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, size As Size2L, dataPointer As DataPointer, pitch As Integer) 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><a class="xref" href="C1.Util.DX.DataPointer.html">DataPointer</a></td>
      <td><span class="parametername">dataPointer</span></td>
      <td><p>A pointer to the memory location of the image data, or NULL to create an uninitialized bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">pitch</span></td>
      <td><p>The byte count of each scanline, which is equal to (the image width in pixels * the number of bytes per pixel) + memory padding. If srcData is NULL, this value is ignored. (Note that pitch is also sometimes called stride.)</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>


<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_Size2L_C1_Util_DX_DataPointer_System_Int32_C1_Util_DX_Direct2D_BitmapProperties_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.Size2L,C1.Util.DX.DataPointer,System.Int32,C1.Util.DX.Direct2D.BitmapProperties)">Create(RenderTarget, Size2L, DataPointer, int, 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 Create(RenderTarget renderTarget, Size2L size, DataPointer dataPointer, int pitch, BitmapProperties bitmapProperties)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, size As Size2L, dataPointer As DataPointer, pitch As Integer, 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><a class="xref" href="C1.Util.DX.DataPointer.html">DataPointer</a></td>
      <td><span class="parametername">dataPointer</span></td>
      <td><p>A pointer to the memory location of the image data, or NULL to create an uninitialized bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">pitch</span></td>
      <td><p>The byte count of each scanline, which is equal to (the image width in pixels * the number of bytes per pixel) + memory padding. If srcData is NULL, this value is ignored. (Note that pitch is also sometimes called stride.)</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>


<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_Direct2D_Bitmap_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.Direct2D.Bitmap)">Create(RenderTarget, Bitmap)</h4>
<div class="markdown level1 summary"><p>Creates an <a class="xref" href="C1.Util.DX.Direct2D.Bitmap.html">Bitmap</a> whose data is shared with another resource.</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(RenderTarget renderTarget, Bitmap bitmap)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, bitmap As Bitmap) 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.Direct2D.Bitmap.html">Bitmap</a></td>
      <td><span class="parametername">bitmap</span></td>
      <td><p>An <a class="xref" href="C1.Util.DX.Direct2D.Bitmap.html">Bitmap</a> that contains the data to share with the new ID2D1Bitmap. For more information, see the Remarks section.</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>


<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_Direct2D_Bitmap_System_Nullable_C1_Util_DX_Direct2D_BitmapProperties__" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.Direct2D.Bitmap,System.Nullable{C1.Util.DX.Direct2D.BitmapProperties})">Create(RenderTarget, Bitmap, BitmapProperties?)</h4>
<div class="markdown level1 summary"><p>Creates an <a class="xref" href="C1.Util.DX.Direct2D.Bitmap.html">Bitmap</a> whose data is shared with another resource.</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(RenderTarget renderTarget, Bitmap bitmap, BitmapProperties? bitmapProperties)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, bitmap As Bitmap, 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.Direct2D.Bitmap.html">Bitmap</a></td>
      <td><span class="parametername">bitmap</span></td>
      <td><p>An <a class="xref" href="C1.Util.DX.Direct2D.Bitmap.html">Bitmap</a> that contains the data to share with the new ID2D1Bitmap. For more information, see the Remarks section.</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 DPI of the bitmap to create . The <a class="xref" href="C1.Util.DX.DXGI.Format.html">Format</a> portion of the pixel format  must match the <a class="xref" href="C1.Util.DX.DXGI.Format.html">Format</a> of data or the method will fail, but the alpha modes don't have to match. To prevent a  mismatch, you can pass NULL or the value obtained from the {{D2D1::PixelFormat}} helper function. The DPI settings do not have to match those of data. If both dpiX and dpiY are  0.0f, the default DPI, 96, is used.</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>


<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_DXGI_Surface_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.DXGI.Surface)">Create(RenderTarget, Surface)</h4>
<div class="markdown level1 summary"><p>Creates an <a class="xref" href="C1.Util.DX.Direct2D.Bitmap.html">Bitmap</a> whose data is shared with another resource.</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(RenderTarget renderTarget, Surface surface)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, surface As Surface) 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.DXGI.Surface.html">Surface</a></td>
      <td><span class="parametername">surface</span></td>
      <td><p>An <a class="xref" href="C1.Util.DX.DXGI.Surface.html">Surface</a> that contains the data to share with the new ID2D1Bitmap. For more information, see the Remarks section.</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>


<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_DXGI_Surface_System_Nullable_C1_Util_DX_Direct2D_BitmapProperties__" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.DXGI.Surface,System.Nullable{C1.Util.DX.Direct2D.BitmapProperties})">Create(RenderTarget, Surface, BitmapProperties?)</h4>
<div class="markdown level1 summary"><p>Creates an <a class="xref" href="C1.Util.DX.Direct2D.Bitmap.html">Bitmap</a> whose data is shared with another resource.</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(RenderTarget renderTarget, Surface surface, BitmapProperties? bitmapProperties)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, surface As Surface, 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.DXGI.Surface.html">Surface</a></td>
      <td><span class="parametername">surface</span></td>
      <td><p>An <a class="xref" href="C1.Util.DX.DXGI.Surface.html">Surface</a> that contains the data to share with the new ID2D1Bitmap. For more information, see the Remarks section.</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 DPI of the bitmap to create . The <a class="xref" href="C1.Util.DX.DXGI.Format.html">Format</a> portion of the pixel format  must match the <a class="xref" href="C1.Util.DX.DXGI.Format.html">Format</a> of data or the method will fail, but the alpha modes don't have to match. To prevent a  mismatch, you can pass NULL or the value obtained from the {{D2D1::PixelFormat}} helper function. The DPI settings do not have to match those of data. If both dpiX and dpiY are  0.0f, the default DPI, 96, is used.</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>


<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_WIC_BitmapLock_System_Nullable_C1_Util_DX_Direct2D_BitmapProperties__" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.WIC.BitmapLock,System.Nullable{C1.Util.DX.Direct2D.BitmapProperties})">Create(RenderTarget, BitmapLock, BitmapProperties?)</h4>
<div class="markdown level1 summary"><p>Creates an <a class="xref" href="C1.Util.DX.Direct2D.Bitmap.html">Bitmap</a> that points to the bitmap data already stored in the <a class="xref" href="C1.Util.DX.WIC.BitmapLock.html">BitmapLock</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(RenderTarget renderTarget, BitmapLock bitmapLock, BitmapProperties? bitmapProperties)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, bitmapLock As BitmapLock, 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.WIC.BitmapLock.html">BitmapLock</a></td>
      <td><span class="parametername">bitmapLock</span></td>
      <td><p>An <a class="xref" href="C1.Util.DX.Direct2D.RenderTarget.html">RenderTarget</a> that contains the data to share with the new <a class="xref" href="C1.Util.DX.Direct2D.Bitmap.html">Bitmap</a>.</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 DPI of the bitmap to create . The <a class="xref" href="C1.Util.DX.DXGI.Format.html">Format</a> portion of the pixel format  must match the <a class="xref" href="C1.Util.DX.DXGI.Format.html">Format</a> of data or the method will fail, but the alpha modes don't have to match. To prevent a  mismatch, you can pass NULL or the value obtained from the {{D2D1::PixelFormat}} helper function. The DPI settings do not have to match those of data. If both dpiX and dpiY are  0.0f, the default DPI, 96, is used.</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>


<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_WIC_BitmapSource_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.WIC.BitmapSource)">Create(RenderTarget, BitmapSource)</h4>
<div class="markdown level1 summary"><p>Creates a Bitmap from a wic bitmap.</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(RenderTarget renderTarget, BitmapSource wicBitmapSource)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, wicBitmapSource As BitmapSource) 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>The render target.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.WIC.BitmapSource.html">BitmapSource</a></td>
      <td><span class="parametername">wicBitmapSource</span></td>
      <td><p>A reference to a <a class="xref" href="C1.Util.DX.WIC.BitmapSource.html">BitmapSource</a> wic bitmap.</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>


<a id="C1_Util_DX_Direct2D_Bitmap_Create_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Bitmap_Create_C1_Util_DX_Direct2D_RenderTarget_C1_Util_DX_WIC_BitmapSource_C1_Util_DX_Direct2D_BitmapProperties_" data-uid="C1.Util.DX.Direct2D.Bitmap.Create(C1.Util.DX.Direct2D.RenderTarget,C1.Util.DX.WIC.BitmapSource,C1.Util.DX.Direct2D.BitmapProperties)">Create(RenderTarget, BitmapSource, BitmapProperties)</h4>
<div class="markdown level1 summary"><p>Creates a Bitmap from a wic bitmap.</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(RenderTarget renderTarget, BitmapSource wicBitmap, BitmapProperties bitmapProperties)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, wicBitmap As BitmapSource, 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>The render target.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.WIC.BitmapSource.html">BitmapSource</a></td>
      <td><span class="parametername">wicBitmap</span></td>
      <td><p>The wic bitmap.</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 bitmap properties.</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>
</div>
