I've been using this function:
Code:
void fix_image_pal(BITMAP * image, PALETTE imgpal)
{
int size_x = image -> w;
int size_y = image -> h;
BITMAP *temp;
temp = create_bitmap(size_x, size_y);
int srcclr, newclr;
for (int x = 0; x < size_x; x++)
{
for (int y = 0; y < size_y; y++)
{
srcclr=getpixel(image,x,y);
newclr=makecol8((imgpal[srcclr].r*4),(imgpal[srcclr].g*4),(imgpal[srcclr].b*4));
putpixel(temp,x,y,newclr);
}
}
blit(temp,image,0,0,0,0,size_x,size_y);
destroy_bitmap(temp);
}
is that what you mean?