CustomEffectBase.ToColor Method

Creates a Color from a UInt32.

Namespace: Lumia.Imaging.Custom
Assembly: Lumia.Imaging.Managed (in Lumia.Imaging.Managed.dll) Version:

Lumia.Imaging.Custom.CustomEffectBase.ToColor = function(uintColor);


Type: System.UInt32
The UInt32 to convert into a color.

Return Value

Type: Color
Returns a Color instance.

If this method is called for every pixel in a buffer, the overhead of the function call may become large. It is better to extract the color channel values inline in the processing algorithm, as in the following sample.
var a = (uintColor >> 24) & 255;
var r = (uintColor >> 16) & 255;
var g = (uintColor >> 8) & 255;
var b = (uintColor) & 255;

Lumia Imaging SDK

Supported in: 2.0