  Microlensing of a gamma-ray burst afterglow by an intervening star can be
used to infer the radial structure of the afterglow image. Near the peak of the
microlensing event, the outer edge of the image is more highly magnified than
its central region, whereas the situation is reversed at later times due to the
rapid radial expansion of the image on the sky. Thus, the microlensed afterglow
light curve can be inverted to recover the self-similar radial intensity
profile of the afterglow image. We calculate the expected errors in the
recovered intensity profile as a function of the number of resolution elements,
under the assumption that the afterglow and microlensing event parameters are
known. For a point-mass lens and uniform source, we derive a simple scaling
relation between these parameters and the resultant errors. The afterglow need
not be monitored for its entire duration; rather, observations from the peak
magnification time t_p of the microlensing event until 7 t_p are sufficient to
resolve the majority of the image. Thus, microlensing events can be alerted by
relatively infrequent observations of afterglows and then monitored
intensively, without significant loss of information about the afterglow
intensity profile. The relative intensity profile of about 1% of all afterglows
can be measured with 10 resolution elements to an accuracy of 1% in the optical
and 10% in the infrared, using 4m-class telescopes. Weak microlensing events
with large impact parameters are more common; we estimate that for about 10% of
afterglows the image profile may be inverted to a fractional accuracy 20%
through frequent optical observations. We also calculate the effects of
external shear due to the host galaxy or a binary companion, and contamination
by background light from the host galaxy.
