//docs/MPImage.doc/MPRGBToPal
NAME
MPRGBToPal -- Convert RGB image to a palette (V7)
SYNOPSIS
MPRGBToPal( MPp,maxcol,pal,bit12 )
A0 D0 A1 D1
void MPRGBToPal
( struct MPProcess *,ULONG,UBYTE *,BOOL);
FUNCTION
Convert RGB to a palette.
INPUTS
MPp - Contains the Red,Green and Blue chunky pixels
and the Width and Height
maxcol - The number of colours in the palette.
pal - The palette. This is a 768 byte array.
pal[0] to pal[maxcol] hold the Red palette
pal[256] to pal[256+maxcol] hold the Green palette
pal[512] to pal[512+maxcol] hold the Blue palette
bit12 - If set then only the top 4 bits of the palette
are used and the mapping is far quicker.
RESULT
The data pointed to by MPp->Red is updated to the palette mapped image.
EXAMPLE
NOTES
If there is insufficient memory then bit12 is treated as false.
BUGS
Not tested.
SEE ALSO
MPGreyToPal().