In this work, we present i) the dilation and refractive index variation associated with changes in film density and ii) gas uptake of pure CO2 and CH4, as well as their equimolar mixture in thin films of two polymers of intrinsic microporosity (PIMs), i.e. PIM-1 and poly(trimethylsilyl)propyne (PTMSP). A conventional low-free-volume glassy polymer, cellulose triacetate (CTA), was also investigated as reference material. All experiments were performed with ~50 and ~500 nm thick films up to partial pressures of 25 bar using in-situ interference-enhanced spectroscopic ellipsometry. In all cases, film thickness reduction promoted the collapse of the frozen-in free volume. Particularly for thin PIM-1 and PTMSP films, the CO2 and CH4 pure-gas uptakes were generally lower than in bulk samples. In the most extreme case of the ultra-thin ~50 nm PTMSP film, we could detect a strikingly similar qualitative behavior to the penetrant partial molar volume and dilation in rubbery polymers. Remarkably, in PIM-1 the collapse of the frozenin free volume seemed to be opposed by its ultramicropores (< 7 Å), which was not the case in PTMSP with larger micropores (> 10 Å). In mixed-gas experiments, the refractive index response of all investigated films closely followed the trend observed during CO2 pure-gas sorption. In both thickness ranges and throughout the entire pressure range, the samples dilated less in the multicomponent environment than in the corresponding ideal pure-gas conditions. We found this phenomenon consistent with the pure-and mixed-gas uptake behavior of PIM-1 and PTMSP bulk films reported in the literature.