# C1.Util.DX.Direct2D.Effects.BitmapSource

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Util_DX_Direct2D_Effects_BitmapSource" data-uid="C1.Util.DX.Direct2D.Effects.BitmapSource" class="text-break">BitmapSource Class
</h1>
  <div class="markdown level0 summary"><p>Builtin BitmapSource effect.</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"><a class="xref" href="C1.Util.DX.DisposeBase.html">DisposeBase</a></div>
    <div class="level2"><a class="xref" href="C1.Util.DX.CppObject.html">CppObject</a></div>
    <div class="level3"><a class="xref" href="C1.Util.DX.ComObject.html">ComObject</a></div>
    <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.Properties.html">Properties</a></div>
    <div class="level5"><a class="xref" href="C1.Util.DX.Direct2D.Effect.html">Effect</a></div>
    <div class="level6"><span class="xref">BitmapSource</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><a class="xref" href="C1.Util.DX.IUnknown.html">IUnknown</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Util.DX.Direct2D.Effects.html">C1.Util.DX.Direct2D.Effects</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.DX.4.6.2.dll</h6>
  <h5 id="C1_Util_DX_Direct2D_Effects_BitmapSource_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class BitmapSource : Effect, IDisposable, IUnknown</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class BitmapSource
    Inherits Effect
    Implements IDisposable, IUnknown</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="C1_Util_DX_Direct2D_Effects_BitmapSource__ctor_System_IntPtr_" data-uid="C1.Util.DX.Direct2D.Effects.BitmapSource.#ctor(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.Direct2D.Effects.BitmapSource.-ctor.html#C1_Util_DX_Direct2D_Effects_BitmapSource__ctor_System_IntPtr_">BitmapSource(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.Direct2D.Effects.BitmapSource.html">BitmapSource</a> class.</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="C1_Util_DX_Direct2D_Effects_BitmapSource_AlphaMode" data-uid="C1.Util.DX.Direct2D.Effects.BitmapSource.AlphaMode">
          <a class="xref" href="C1.Util.DX.Direct2D.Effects.BitmapSource.AlphaMode.html#C1_Util_DX_Direct2D_Effects_BitmapSource_AlphaMode">AlphaMode</a>
        </td>
        <td class="markdown level1 summary"><p>The alpha mode of the output. This can be either premultiplied or straight. See Alpha modes for more info.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Effects_BitmapSource_EnableDpiCorrection" data-uid="C1.Util.DX.Direct2D.Effects.BitmapSource.EnableDpiCorrection">
          <a class="xref" href="C1.Util.DX.Direct2D.Effects.BitmapSource.EnableDpiCorrection.html#C1_Util_DX_Direct2D_Effects_BitmapSource_EnableDpiCorrection">EnableDpiCorrection</a>
        </td>
        <td class="markdown level1 summary"><p>If you set this to true, the effect will scale the input image to convert the DPI reported by IWICBitmapSource to the DPI of the device context.
The effect uses the interpolation mode you set with the InterpolationMode property.
If you set this to false, the effect uses a DPI of 96.0 for the output image.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Effects_BitmapSource_InterpolationMode" data-uid="C1.Util.DX.Direct2D.Effects.BitmapSource.InterpolationMode">
          <a class="xref" href="C1.Util.DX.Direct2D.Effects.BitmapSource.InterpolationMode.html#C1_Util_DX_Direct2D_Effects_BitmapSource_InterpolationMode">InterpolationMode</a>
        </td>
        <td class="markdown level1 summary"><p>The interpolation mode used to scale the image. See Interpolation modes for more info.
If the mode disables the mipmap, then BitmapSouce will cache the image at the resolution determined by the Scale and EnableDPICorrection properties.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Effects_BitmapSource_Orientation" data-uid="C1.Util.DX.Direct2D.Effects.BitmapSource.Orientation">
          <a class="xref" href="C1.Util.DX.Direct2D.Effects.BitmapSource.Orientation.html#C1_Util_DX_Direct2D_Effects_BitmapSource_Orientation">Orientation</a>
        </td>
        <td class="markdown level1 summary"><p>A flip and/or rotation operation to be performed on the image. See Orientation for more info.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Effects_BitmapSource_ScaleSource" data-uid="C1.Util.DX.Direct2D.Effects.BitmapSource.ScaleSource">
          <a class="xref" href="C1.Util.DX.Direct2D.Effects.BitmapSource.ScaleSource.html#C1_Util_DX_Direct2D_Effects_BitmapSource_ScaleSource">ScaleSource</a>
        </td>
        <td class="markdown level1 summary"><p>The scale amount in the X and Y direction.
The effect multiplies the width by the X value and the height by the Y value.
This property is a <a class="xref" href="C1.Util.DX.Vector2.html">Vector2</a> defined as: (X scale, Y scale). The scale amounts are FLOAT, unitless, and must be positive or 0.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Effects_BitmapSource_WicBitmapSource" data-uid="C1.Util.DX.Direct2D.Effects.BitmapSource.WicBitmapSource">
          <a class="xref" href="C1.Util.DX.Direct2D.Effects.BitmapSource.WicBitmapSource.html#C1_Util_DX_Direct2D_Effects_BitmapSource_WicBitmapSource">WicBitmapSource</a>
        </td>
        <td class="markdown level1 summary"><p>The <a class="xref" href="C1.Util.DX.WIC.BitmapSource.html">BitmapSource</a> containing the image data to be loaded.</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="C1_Util_DX_Direct2D_Effects_BitmapSource_Create_C1_Util_DX_Direct2D_DeviceContext_" data-uid="C1.Util.DX.Direct2D.Effects.BitmapSource.Create(C1.Util.DX.Direct2D.DeviceContext)">
          <a class="xref" href="C1.Util.DX.Direct2D.Effects.BitmapSource.Create.html#C1_Util_DX_Direct2D_Effects_BitmapSource_Create_C1_Util_DX_Direct2D_DeviceContext_">Create(DeviceContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of <a class="xref" href="C1.Util.DX.Direct2D.Effects.BitmapSource.html">BitmapSource</a> effect.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
