Merge multiple 2d sprites into one

Hi,
What would be the best technique to merge a selction of multiple 2d sprites into one? What I am trying to achieve is when the 2d sprites are no longer active I would like to merge all of the none-active into one texture. Also would it be possible to merge non-active textures into a single texture?