pixel_to_vec(COLOR* color, var* alpha,var format,var pixel) : COLOR*

Retrieves the color and alpha values from a pixel in a given format.

Parameters:

color a BGR color vector to receive the pixel colors, or NULL for returning a temporary vector.
alpha a variable pointer to receive the pixel transparency, or NULL.
format the pixel format: 88, 565, 888, 1555, 4444, or 8888.
pixel the pixel to be converted.

Returns:

color

Speed:

Fast

Example:

pixel_to_vec(temp,alpha,8888,pixel);

See also:

pixel_for_vec ► latest version online