# GrapeCity.Documents.Imaging.GcBitmap.AdjustLevels

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_GcBitmap_AdjustLevels_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.AdjustLevels*">AdjustLevels Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_GcBitmap_AdjustLevels_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.AdjustLevels*"></a>
<h4 id="GrapeCity_Documents_Imaging_GcBitmap_AdjustLevels_System_Drawing_Color_System_Drawing_Color_System_Drawing_Color_System_Drawing_Color_System_Single_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.AdjustLevels(System.Drawing.Color,System.Drawing.Color,System.Drawing.Color,System.Drawing.Color,System.Single)">AdjustLevels(Color, Color, Color, Color, float)</h4>
<div class="markdown level1 summary"><p>Adjusts the levels of an image histogram.</p>
<p>The method maps the input range of values (blackPoint..whitePoint) to the output
range (outputBlack..outputWhite) using the specified gamma correction (midtone).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AdjustLevels(Color blackPoint, Color whitePoint, Color outputBlack, Color outputWhite, float midtone = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AdjustLevels(blackPoint As Color, whitePoint As Color, outputBlack As Color, outputWhite As Color, Optional midtone As Single = 1)</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.drawing.color">Color</a></td>
      <td><span class="parametername">blackPoint</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">whitePoint</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">outputBlack</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">outputWhite</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">midtone</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_GcBitmap_AdjustLevels_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.AdjustLevels*"></a>
<h4 id="GrapeCity_Documents_Imaging_GcBitmap_AdjustLevels_System_UInt32_System_UInt32_System_UInt32_System_UInt32_System_Single_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.AdjustLevels(System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.Single)">AdjustLevels(uint, uint, uint, uint, float)</h4>
<div class="markdown level1 summary"><p>Adjusts the levels of an image histogram.</p>
<p>The method maps the input range of values (blackPoint..whitePoint) to the output
range (outputBlack..outputWhite) using the specified gamma correction (midtone).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AdjustLevels(uint blackPoint, uint whitePoint, uint outputBlack, uint outputWhite, float midtone = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AdjustLevels(blackPoint As UInteger, whitePoint As UInteger, outputBlack As UInteger, outputWhite As UInteger, Optional midtone As Single = 1)</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.uint32">uint</a></td>
      <td><span class="parametername">blackPoint</span></td>
      <td><p>The input black point in 32-bit ARGB format (the Alpha channel is ignored).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.uint32">uint</a></td>
      <td><span class="parametername">whitePoint</span></td>
      <td><p>The input white point in 32-bit ARGB format (the Alpha channel is ignored).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.uint32">uint</a></td>
      <td><span class="parametername">outputBlack</span></td>
      <td><p>The output black point in 32-bit ARGB format (the Alpha channel is ignored).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.uint32">uint</a></td>
      <td><span class="parametername">outputWhite</span></td>
      <td><p>The output white point in 32-bit ARGB format (the Alpha channel is ignored).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">midtone</span></td>
      <td><p>The value of gamma correction.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
