# C1.Util.DX.WIC.BitmapSourceTransform.GetClosestSize

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_WIC_BitmapSourceTransform_GetClosestSize_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.GetClosestSize*">GetClosestSize Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_WIC_BitmapSourceTransform_GetClosestSize_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.GetClosestSize*"></a>
<h4 id="C1_Util_DX_WIC_BitmapSourceTransform_GetClosestSize_C1_Util_DX_Size2L__" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.GetClosestSize(C1.Util.DX.Size2L@)">GetClosestSize(ref Size2L)</h4>
<div class="markdown level1 summary"><p>Returns the closest dimensions the implementation can natively scale to given the desired dimensions.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void GetClosestSize(ref Size2L size)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub GetClosestSize(ByRef size As Size2L)</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="C1.Util.DX.Size2L.html">Size2L</a></td>
      <td><span class="parametername">size</span></td>
      <td><p>The size.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_WIC_BitmapSourceTransform_GetClosestSize_" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.GetClosestSize*"></a>
<h4 id="C1_Util_DX_WIC_BitmapSourceTransform_GetClosestSize_System_Int32__System_Int32__" data-uid="C1.Util.DX.WIC.BitmapSourceTransform.GetClosestSize(System.Int32@,System.Int32@)">GetClosestSize(ref int, ref int)</h4>
<div class="markdown level1 summary"><p>HRESULT IWICBitmapSourceTransform::GetClosestSize([InOut] unsigned int* puiWidth,[InOut] unsigned int* puiHeight)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void GetClosestSize(ref int widthRef, ref int heightRef)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub GetClosestSize(ByRef widthRef As Integer, ByRef heightRef As Integer)</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">widthRef</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">heightRef</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
