[]
Helper to use with Format.
public static class FormatHelper
Computes the scanline count (number of scanlines).
public static int ComputeScanlineCount(Format fmt, int height)
The scanline count.
Returns true if the Format is a compressed format.
public static bool IsCompressed(Format fmt)
fmt
FormatThe format to check for compressed.
True if the Format is a compressed format
Determines whether the specified Format is packed.
public static bool IsPacked(Format fmt)
fmt
FormatThe DXGI Format.
true
if the specified Format is packed; otherwise, false
.
Determines whether the specified Format is a SRGB format.
public static bool IsSRgb(Format fmt)
true
if the specified Format is a SRGB format; otherwise, false
.
Determines whether the specified Format is typeless.
public static bool IsTypeless(Format fmt)
true
if the specified Format is typeless; otherwise, false
.
Returns true if the Format is valid.
public static bool IsValid(Format format)
format
FormatA format to validate
True if the Format is valid.
Determines whether the specified Format is video.
public static bool IsVideo(Format fmt)
true
if the specified Format is video; otherwise, false
.
Calculates the size of a Format in bits.
public static int SizeOfInBits(Format format)
format
FormatThe dxgi format.
size of in bits
Calculates the size of a Format in bytes.
public static float SizeOfInBytes(Format format)
format
FormatThe dxgi format.
size of in bytes