In the files of a game called "strip poker: night at the inventory", you can see how the limbs, head, and torso are all different "png/jpeg"s. It swaps body images for movement, and overlaps and removes clothing images for stripping.
Yeah I just checked the game out and I see what you mean. I think I might be able to do that, I would just have make the body part/clothing pngs.