# GrapeCity.Documents.Imaging.GcBitmap.ToBilevelBitmap

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_GcBitmap_ToBilevelBitmap_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.ToBilevelBitmap*">ToBilevelBitmap Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_GcBitmap_ToBilevelBitmap_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.ToBilevelBitmap*"></a>
<h4 id="GrapeCity_Documents_Imaging_GcBitmap_ToBilevelBitmap_GrapeCity_Documents_Imaging_ColorChannel_System_Boolean_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GcBitmap.ToBilevelBitmap(GrapeCity.Documents.Imaging.ColorChannel,System.Boolean,System.Boolean)">ToBilevelBitmap(ColorChannel, bool, bool)</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> from the current <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a>.</p>
<p>This method does not perform any transformations of the color palette.
It is expected that the source <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> has already been converted
to bi-level palette using some thresholding or dithering effects.
The <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.ToBilevelBitmap.html#GrapeCity_Documents_Imaging_GcBitmap_ToBilevelBitmap_GrapeCity_Documents_Imaging_ColorChannel_System_Boolean_System_Boolean_">ToBilevelBitmap(ColorChannel, bool, bool)</a> method just copies data from a specified color
channel to a new instance of the <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public BilevelBitmap ToBilevelBitmap(ColorChannel colorChannel = ColorChannel.Blue, bool lowerBitsFirst = false, bool whiteIsZero = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ToBilevelBitmap(Optional colorChannel As ColorChannel = ColorChannel.Blue, Optional lowerBitsFirst As Boolean = False, Optional whiteIsZero As Boolean = False) As BilevelBitmap</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="GrapeCity.Documents.Imaging.ColorChannel.html">ColorChannel</a></td>
      <td><span class="parametername">colorChannel</span></td>
      <td><p>The color channel used as the source of the bi-level data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">lowerBitsFirst</span></td>
      <td><p>If true, pixels are arranged within a byte such that pixels with lower column indices are stored in the lower-order bits of the byte.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">whiteIsZero</span></td>
      <td><p>If true, indicates that 0 represents white and 1 represents black in the resulting <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a>.</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="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a></td>
      <td><p>A new instance of <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
