Click or drag to resize
Ab4d.SharpEngine logo

RawImageDataGetFormatProperties Method

GetFormatProperties sets the hasAlpha, pixelSize and alphaOffset properties from the image format. The method returns false when the format is not known.

Namespace: Ab4d.SharpEngine.Common
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public static bool GetFormatProperties(
	Format format,
	out bool hasAlpha,
	out int bytesPerPixel,
	out int alphaOffset
)

Parameters

format  Format
image format
hasAlpha  Boolean
true if format supports alpha channel
bytesPerPixel  Int32
size of pixels in bytes
alphaOffset  Int32
offset of alpha channel

Return Value

Boolean
true when the format is known, false when the format is not known (in this case the same data as for R8G8B8A8UNorm is returned - alpha is true, pixel size is 4, alphaOffset is 3)
See Also