I'm currently working on a texture pack for minecraft (but this question is not restricted to that). All terrain textures are squared and stored in one big terrain.png, see e.g. here (FYI that's from Glimmar's Steampunk pack). I'd like to store each texture in an individual file and have same automated process pack them into the terrain.png later on (maybe leaving the not yet created ones their default). At the moment I do this manually by copy/pasting them with gimp (at least the raster helps a lot here) but I'd really like to do this automatically. Basically this seems to be what happens behind the scenes of the Painterly pack customizer already. So,
Is there a tool that replaces some
squarespolygons* in a png file with new ones (also png), the position of which might be configured in a separate file?
edit Some automated resizing for different resolution versions might be nice as well...
*) might as well ask the general case