SDL_GetRGB

Name

SDL_GetRGB -- Get RGB values from a pixel in the specified pixel format.

Synopsis

uses 
SDL;

procedure SDL_GetRGB( pixel : UInt32; fmt : PSDL_PixelFormat; r : PUInt8; g : PUint8; b : PUInt8);

Description

Get RGB component values from a pixel stored in the specified pixel format.

This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [$ff, $ff, $ff] not [$f8, $fc, $f8]).

See Also

SDL_GetRGBA, SDL_MapRGB, SDL_MapRGBA , TSDL_PixelFormat