is it possible to create a alpha channel for a bmap and safe it in the bmap by script?

i mean,
i have 2 bmap`s
1 colored with a pattern
and 1 black bmap with a white shape
can i copy the 2nd bmap as alpha channel into the 1st one?