Win32 DirectX Fastgraph/Light


void fg_transdcb (void *source, void *dest, int source_depth, int dest_depth, int size);

Sub fg_transdcb (source() As Any, dest() As Any, ByVal source_depth As Long, ByVal dest_depth As Long, ByVal size As Long)

procedure fg_transdcb (var source, dest; source_depth, dest_depth, size : integer);


The fg_transdcb() function translates a direct color bitmap to another color depth.


source is the name of the array containing the direct color bitmap to be converted.

dest is the name of the array that will receive the resulting converted bitmap.

source_depth is the color depth of the source bitmap. It must be 15, 16, or 24.

dest_depth is the color depth of the dest bitmap. It must be 15, 16, or 24.

size is the size of each direct color bitmap in pixels.

Return value



If source_depth and dest_depth are not 15, 16, or 24, fg_transdcb() does nothing.

If translating a high color bitmap to true color, the source and dest bitmaps must be different bitmaps.

See also

fg_getdepth(), fg_gethcbpp()

Fastgraph Home Page


copyright 2001 Ted Gruber Software, Inc.