Click or drag to resize
Ab4d.SharpEngine logo

RawImageDataCheckTransparentPixels Method

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

Namespace: Ab4d.SharpEngine.Common
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public static bool CheckTransparentPixels(
	IntPtr imageDataPtr,
	int width,
	int height,
	int stride,
	int alphaOffset = 3,
	int pixelSize = 4
)

Parameters

imageDataPtr  IntPtr
IntPtr to byte array with image 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