can anybody help me, on how to create an SIS file ON THE FLY,

i have an application in PHP which accepts a jpg file where i can merge it to the
background image file of the theme,

then my problem is on how to create a theme ON the FLY ( or the SIS file )

so that the new mergedfile will be the background of the theme

is this possible ???

pls somebody help me!