  We present the results of an investigation of post-Main Sequence mass loss
from stars in clusters in the Magellanic Clouds, based around an imaging survey
in the L'-band (3.8 micron) performed with the VLT at ESO. The data are
complemented with JHKs and mid-IR photometry. The goal is to determine the
influence of initial metallicity and initial mass on the mass loss and
evolution during the latest stages of stellar evolution. Dust-enshrouded giants
are identified by their reddened near-IR colours and thermal-IR dust excess
emission. Most of these objects are Asymptotic Giant Branch (AGB) carbon stars
in intermediate-age clusters, with progenitor masses between 1.3 and about 5
Msun. Red supergiants with circumstellar dust envelopes are found in young
clusters, and have progenitor masses between 13 and 20 Msun. Post-AGB objects
(e.g., Planetary Nebulae) and massive stars with detached envelopes and/or hot
central stars are found in several clusters. We model the spectral energy
distributions of the cluster IR objects to estimate their bolometric
luminosities and mass-loss rates. The IR objects are the most luminous cluster
objects, and have luminosities as expected for their initial mass and
metallicity. They experience mass-loss rates in the range from a few 1e-6 up to
1e-4 Msun/yr (or more), with most of the spread being due to evolutionary
effects and only a weak dependence on progenitor mass and/or initial
metallicity. About half of the mass lost by 1.3--3 Msun stars is shed during
the superwind phase, which lasts of order 1e5 yr. Objects with detached shells
are found to have experienced the highest mass-loss rates, and are therefore
interpreted as post-superwind objects. We also propose a simple method to
measure the cluster mass from L'-band images.
