hello,
may be those bmap_lock calls need their second parameter.
Does 'my_bmap.tga' have 32bit format? I'm not sure but both bmaps should have same.

Salud!