Microstructure of FeSe1-xTex thin films near the interface to CaF2 is investigated by means of transmission electron microscopy (TEM) and energy-dispersive X-ray analysis (EDX). TEM observation at the initial crystal-growth stage reveals that marked lattice compression occurs along the in-plane direction in the films with Se-rich composition, while the a-axis length of FeTe remains as its original value of bulk crystal. Subsequent EDX analysis demonstrates substantial diffusion of Se into the CaF2 substrate. Such diffusion is not prominent for Te. Thus, the formation of Se-deficient layer at the initial growth stage on CaF2 is concluded to be the main reason of the lattice compression in FeSe1-xTex thin films.