# GrapeCity.Documents.Imaging.GrayscaleBitmap.AdjustLevels

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_GrayscaleBitmap_AdjustLevels_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.AdjustLevels*">AdjustLevels Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_GrayscaleBitmap_AdjustLevels_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.AdjustLevels*"></a>
<h4 id="GrapeCity_Documents_Imaging_GrayscaleBitmap_AdjustLevels_System_Int32_System_Int32_System_Int32_System_Int32_System_Single_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.AdjustLevels(System.Int32,System.Int32,System.Int32,System.Int32,System.Single)">AdjustLevels(int, int, int, int, 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(int blackPoint, int whitePoint, int outputBlack, int outputWhite, float midtone = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AdjustLevels(blackPoint As Integer, whitePoint As Integer, outputBlack As Integer, outputWhite As Integer, 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.int32">int</a></td>
      <td><span class="parametername">blackPoint</span></td>
      <td><p>The input black point (from 0 to 255).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">whitePoint</span></td>
      <td><p>The input white point (from 0 to 255).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">outputBlack</span></td>
      <td><p>The output black point (from 0 to 255).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">outputWhite</span></td>
      <td><p>The output white point (from 0 to 255).</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>
