Iori's $gif2png() uses IrfanView for conversion and can be modified easily to take BMPs instead of GIFs. I just thought it's worth mentioning...