# GrapeCity.Documents.Imaging.BilevelBitmap

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Imaging_BilevelBitmap" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap" class="text-break">BilevelBitmap Class
</h1>
  <div class="markdown level0 summary"><p>Represents a bi-level transparency mask or an image containing two colors - black and white in either a white-is-zero or black-is-zero format.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">BilevelBitmap</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Drawing.IImage.html">IImage</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Imaging.html">GrapeCity.Documents.Imaging</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Imaging.dll</h6>
  <h5 id="GrapeCity_Documents_Imaging_BilevelBitmap_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class BilevelBitmap : IImage, IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class BilevelBitmap
    Implements IImage, IDisposable</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap__ctor_System_Byte___System_Int32_System_Int32_System_Boolean_System_Boolean_System_Boolean_System_Single_System_Single_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.#ctor(System.Byte[],System.Int32,System.Int32,System.Boolean,System.Boolean,System.Boolean,System.Single,System.Single)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.-ctor.html#GrapeCity_Documents_Imaging_BilevelBitmap__ctor_System_Byte___System_Int32_System_Int32_System_Boolean_System_Boolean_System_Boolean_System_Single_System_Single_">BilevelBitmap(byte[], int, int, bool, bool, bool, float, float)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> class and sets the existing pixel data to be read/modified in-place.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap__ctor_System_Int32_System_Int32_System_Boolean_System_Boolean_System_Boolean_System_Single_System_Single_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.#ctor(System.Int32,System.Int32,System.Boolean,System.Boolean,System.Boolean,System.Single,System.Single)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.-ctor.html#GrapeCity_Documents_Imaging_BilevelBitmap__ctor_System_Int32_System_Int32_System_Boolean_System_Boolean_System_Boolean_System_Single_System_Single_">BilevelBitmap(int, int, bool, bool, bool, float, float)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap__ctor_System_IntPtr_System_Int32_System_Int32_System_Boolean_System_Boolean_System_Boolean_System_Single_System_Single_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.#ctor(System.IntPtr,System.Int32,System.Int32,System.Boolean,System.Boolean,System.Boolean,System.Single,System.Single)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.-ctor.html#GrapeCity_Documents_Imaging_BilevelBitmap__ctor_System_IntPtr_System_Int32_System_Int32_System_Boolean_System_Boolean_System_Boolean_System_Single_System_Single_">BilevelBitmap(IntPtr, int, int, bool, bool, bool, float, float)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> class and sets the existing pixel data to be read/modified in-place.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_DpiX" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.DpiX">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.DpiX.html#GrapeCity_Documents_Imaging_BilevelBitmap_DpiX">DpiX</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the horizontal dpi of the bitmap.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_DpiY" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.DpiY">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.DpiY.html#GrapeCity_Documents_Imaging_BilevelBitmap_DpiY">DpiY</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the vertical dpi of the bitmap.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_ExifProfile" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.ExifProfile">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.ExifProfile.html#GrapeCity_Documents_Imaging_BilevelBitmap_ExifProfile">ExifProfile</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets an instance of <a class="xref" href="GrapeCity.Documents.Imaging.Exif.ExifProfile.html">ExifProfile</a> with Exif metadata of the image.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_IccProfileData" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.IccProfileData">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.IccProfileData.html#GrapeCity_Documents_Imaging_BilevelBitmap_IccProfileData">IccProfileData</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the raw ICC profile data.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_IsDisposed" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.IsDisposed">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.IsDisposed.html#GrapeCity_Documents_Imaging_BilevelBitmap_IsDisposed">IsDisposed</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating whether the <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> has been disposed of.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_Item_System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.Item(System.Int32,System.Int32)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.Item.html#GrapeCity_Documents_Imaging_BilevelBitmap_Item_System_Int32_System_Int32_">this[int, int]</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a pixel value (true is 1, false is 0) at the specified coordinates.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_LowerBitsFirst" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.LowerBitsFirst">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.LowerBitsFirst.html#GrapeCity_Documents_Imaging_BilevelBitmap_LowerBitsFirst">LowerBitsFirst</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value specifying whether pixels with lower column indices are stored in the lower-order bits of the byte.</p>
<p>Setting this property causes an update to the pixel data.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_PixelHeight" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.PixelHeight">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.PixelHeight.html#GrapeCity_Documents_Imaging_BilevelBitmap_PixelHeight">PixelHeight</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the pixel height of the image.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_PixelWidth" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.PixelWidth">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.PixelWidth.html#GrapeCity_Documents_Imaging_BilevelBitmap_PixelWidth">PixelWidth</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the pixel width of the image.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_RawData" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.RawData">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.RawData.html#GrapeCity_Documents_Imaging_BilevelBitmap_RawData">RawData</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a pointer to the internal binary data.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_Rotation" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.Rotation">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.Rotation.html#GrapeCity_Documents_Imaging_BilevelBitmap_Rotation">Rotation</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the flip and rotate transformations that must be applied to the image.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_ScanLineLength" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.ScanLineLength">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.ScanLineLength.html#GrapeCity_Documents_Imaging_BilevelBitmap_ScanLineLength">ScanLineLength</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the number of bytes in one scan line.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_TransparencyMask" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.TransparencyMask">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.TransparencyMask.html#GrapeCity_Documents_Imaging_BilevelBitmap_TransparencyMask">TransparencyMask</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the image is used to define an irregularly shaped region of another image.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_WhiteIsZero" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.WhiteIsZero">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.WhiteIsZero.html#GrapeCity_Documents_Imaging_BilevelBitmap_WhiteIsZero">WhiteIsZero</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether 0 represents white and 1 represents black (if true) or vice versa (if false).</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_ApplyLicenseKey_System_String_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.ApplyLicenseKey(System.String)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.ApplyLicenseKey.html#GrapeCity_Documents_Imaging_BilevelBitmap_ApplyLicenseKey_System_String_">ApplyLicenseKey(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Applies a license key to an instance of <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_Clear_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.Clear(System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.Clear.html#GrapeCity_Documents_Imaging_BilevelBitmap_Clear_System_Boolean_">Clear(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Clears the <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> with the specified value (true is 1, false is 0).</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_Clear_System_Boolean_System_Drawing_Rectangle_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.Clear(System.Boolean,System.Drawing.Rectangle)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.Clear.html#GrapeCity_Documents_Imaging_BilevelBitmap_Clear_System_Boolean_System_Drawing_Rectangle_">Clear(bool, Rectangle)</a>
        </td>
        <td class="markdown level1 summary"><p>Clears the <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> with the specified value (true is 1, false is 0).</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_Clip_System_Drawing_Rectangle_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.Clip(System.Drawing.Rectangle,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.Clip.html#GrapeCity_Documents_Imaging_BilevelBitmap_Clip_System_Drawing_Rectangle_System_Boolean_">Clip(Rectangle, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> with a fragment of the image.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_Clone_System_Boolean_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.Clone(System.Boolean,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.Clone.html#GrapeCity_Documents_Imaging_BilevelBitmap_Clone_System_Boolean_System_Boolean_">Clone(bool, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a> with a copy of the image.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_Dispose" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.Dispose">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.Dispose.html#GrapeCity_Documents_Imaging_BilevelBitmap_Dispose">Dispose()</a>
        </td>
        <td class="markdown level1 summary"><p>Clean up any resources being used.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_Dispose_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.Dispose(System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.Dispose.html#GrapeCity_Documents_Imaging_BilevelBitmap_Dispose_System_Boolean_">Dispose(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Performs cleanup operations on managed and unmanaged resources.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_InvertColors" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.InvertColors">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.InvertColors.html#GrapeCity_Documents_Imaging_BilevelBitmap_InvertColors">InvertColors()</a>
        </td>
        <td class="markdown level1 summary"><p>Inverts all black pixels to white and all white pixels to black.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_SetDpi_System_Single_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.SetDpi(System.Single)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.SetDpi.html#GrapeCity_Documents_Imaging_BilevelBitmap_SetDpi_System_Single_">SetDpi(float)</a>
        </td>
        <td class="markdown level1 summary"><p>Changes the physical resolution of the image.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_SetDpi_System_Single_System_Single_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.SetDpi(System.Single,System.Single)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.SetDpi.html#GrapeCity_Documents_Imaging_BilevelBitmap_SetDpi_System_Single_System_Single_">SetDpi(float, float)</a>
        </td>
        <td class="markdown level1 summary"><p>Changes the physical resolution of the image.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_ToGcBitmap" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.ToGcBitmap">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.ToGcBitmap.html#GrapeCity_Documents_Imaging_BilevelBitmap_ToGcBitmap">ToGcBitmap()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates an instance of the <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> class from the current <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.html">BilevelBitmap</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Imaging_BilevelBitmap_ToGcBitmap_GrapeCity_Documents_Imaging_GcBitmap_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.BilevelBitmap.ToGcBitmap(GrapeCity.Documents.Imaging.GcBitmap,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Imaging.BilevelBitmap.ToGcBitmap.html#GrapeCity_Documents_Imaging_BilevelBitmap_ToGcBitmap_GrapeCity_Documents_Imaging_GcBitmap_System_Boolean_">ToGcBitmap(GcBitmap, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Copies the image into an existing instance of <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
