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.

For Use

  • Universal Windows Platform apps
  • Windows desktop apps
  • Windows 11
  • Windows 10
  • Windows 8.1
  • Windows 7 Service Pack 1
  • Xbox One
  • Xbox Series X|S
  • Windows Subsystem for Linux

For Development

  • Visual Studio 2022
  • Visual Studio 2019 (16.11)
  • clang/LLVM v12 - v18
  • GCC 10.5, 11.4, 12.3
  • MinGW 12.2, 13.2
  • CMake 3.20

Related Projects

DirectXTex Rust bindings

DirectX Tool Kit for DirectX 11

DirectX Tool Kit for DirectX 12

DirectXMesh

DirectXMath

Tools

Test Suite

Content Exporter

DxCapsViewer

See also

DirectX Landing Page

Clone this wiki locally