Nevron Open Vision Documentation
Nevron.Nov.Graphics Namespace / NRaster Class / TryGetUniformAlphaFromPixels Method
If all pixels have the same alpha value, this parameter stores the unfiorm alpha value as a floating point number in the range [0, 1]. If the alpha is not uniform this parameter is set to -1.0.


In This Topic
    TryGetUniformAlphaFromPixels Method
    In This Topic
    Attempts to obtain an uniform alpha value from the raster pixels.
    Syntax
    'Declaration
     
    
    Public Function TryGetUniformAlphaFromPixels( _
       ByRef alpha As System.Single _
    ) As System.Boolean
    'Usage
     
    
    Dim instance As NRaster
    Dim alpha As System.Single
    Dim value As System.Boolean
     
    value = instance.TryGetUniformAlphaFromPixels(alpha)
    public System.bool TryGetUniformAlphaFromPixels( 
       out System.float alpha
    )

    Parameters

    alpha
    If all pixels have the same alpha value, this parameter stores the unfiorm alpha value as a floating point number in the range [0, 1]. If the alpha is not uniform this parameter is set to -1.0.

    Return Value

    Returns true if all pixels have the same alpha value, otherwise false.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

    See Also