Skip to content

ComputeScanlines

Chuck Walbourn edited this page Jan 21, 2022 · 3 revisions
DirectXTex

Returns the number of horizontal scanlines in an image given the DXGI format and pixel height.

size_t ComputeScanlines( DXGI_FORMAT fmt, size_t height );

Remarks

For most images, the number of scanlines is the same as the height of the image. For block-compressed (BC) images, the number of scanlines is 1/4 of the original height since each scanline contains 4x4 blocks. For planar images, this number can be 1.5x or 2x the original height.