Hello,
The docs for save_bmp_pf on the site and also on the man pages have the syntax for save_bmp_pf a bit wrong.
The syntax written is:
int save_bmp_pf(PACKFILE *f, RGB *pal);
when it should be:
int save_bmp_pf(PACKFILE *f, BITMAP *bmp, RGB *pal);
Only a small thing but it confused me first time 
http://www.allegro.cc/manual/api/loading-image-files/save_bmp_pf
Fixed in SVN, thanks.