Formation of nanocapsules by emulsion-diffusion: prediction of the emulsion size