Click or drag to resize
AB4D logo

TextureLoaderHasTransparentPixels Method

HasTransparentPixels returns true when the loaded image contains transparent pixels (where alpha is less the 1); for fully opaque image false is returned.

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public static bool HasTransparentPixels(
	byte[] textureBytes,
	int width,
	int height,
	int stride,
	int alphaOffset = 3,
	int pixelSize = 4
)

Parameters

textureBytes  Byte
byte array with texture data
width  Int32
texture width in pixels
height  Int32
texture height in pixels
stride  Int32
one row size in bytes
alphaOffset  Int32  (Optional)
specifies the offset of the alpha byte in the pixel bytes (for BGRA the correct value is 3)
pixelSize  Int32  (Optional)
size of one pixel in bytes (4 by default for BGRA)

Return Value

Boolean
true when the loaded image contains transparent pixels (where alpha is less the 1); for fully opaque image false is returned
See Also