# GrapeCity.Documents.Imaging.Windows.GcD2DBitmap.CreateImage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_Windows_GcD2DBitmap_CreateImage_" data-uid="GrapeCity.Documents.Imaging.Windows.GcD2DBitmap.CreateImage*">CreateImage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_Windows_GcD2DBitmap_CreateImage_" data-uid="GrapeCity.Documents.Imaging.Windows.GcD2DBitmap.CreateImage*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcD2DBitmap_CreateImage_System_Int32_System_Int32_System_Single_System_Single_" data-uid="GrapeCity.Documents.Imaging.Windows.GcD2DBitmap.CreateImage(System.Int32,System.Int32,System.Single,System.Single)">CreateImage(int, int, float, float)</h4>
<div class="markdown level1 summary"><p>Creates an image with the given size and resolution.</p>
<p>The content is not initialized by this method and can contain any random data.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void CreateImage(int pixelWidth, int pixelHeight, float dpiX, float dpiY)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CreateImage(pixelWidth As Integer, pixelHeight As Integer, dpiX As Single, dpiY As Single)</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.int32">int</a></td>
      <td><span class="parametername">pixelWidth</span></td>
      <td><p>The width of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">pixelHeight</span></td>
      <td><p>The height of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">dpiX</span></td>
      <td><p>The horizontal resolution (DPI) of the image.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">dpiY</span></td>
      <td><p>The vertical resolution (DPI) of the image.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_Windows_GcD2DBitmap_CreateImage_" data-uid="GrapeCity.Documents.Imaging.Windows.GcD2DBitmap.CreateImage*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcD2DBitmap_CreateImage_System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Imaging.Windows.GcD2DBitmap.CreateImage(System.Int32,System.Int32)">CreateImage(int, int)</h4>
<div class="markdown level1 summary"><p>Creates an image with the given size and 96 DPI resolution.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void CreateImage(int pixelWidth, int pixelHeight)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub CreateImage(pixelWidth As Integer, pixelHeight As Integer)</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.int32">int</a></td>
      <td><span class="parametername">pixelWidth</span></td>
      <td><p>The width of the image, in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">pixelHeight</span></td>
      <td><p>The height of the image, in pixels.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
