# GrapeCity.Documents.Imaging.GrayscaleBitmap.ShrinkPixelFormat

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_GrayscaleBitmap_ShrinkPixelFormat_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.ShrinkPixelFormat*">ShrinkPixelFormat Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_GrayscaleBitmap_ShrinkPixelFormat_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.ShrinkPixelFormat*"></a>
<h4 id="GrapeCity_Documents_Imaging_GrayscaleBitmap_ShrinkPixelFormat_System_Int32_GrapeCity_Documents_Imaging_DitheringMethod_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.ShrinkPixelFormat(System.Int32,GrapeCity.Documents.Imaging.DitheringMethod)">ShrinkPixelFormat(int, DitheringMethod)</h4>
<div class="markdown level1 summary"><p>Changes pixel format from 8 bits per pixel to lower value with two-dimensional error diffusion.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ShrinkPixelFormat(int bitsInPixel, DitheringMethod ditheringMethod)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ShrinkPixelFormat(bitsInPixel As Integer, ditheringMethod As DitheringMethod)</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">bitsInPixel</span></td>
      <td><p>The target number of bits per pixel (from 1 to 8).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Imaging.DitheringMethod.html">DitheringMethod</a></td>
      <td><span class="parametername">ditheringMethod</span></td>
      <td><p>The method of two-dimensional error diffusion dithering.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
