A semiclassical theory of incoherent diffractive imaging is given, based on the Hanbury Brown and Twiss effect when used to image inner-shell x-ray fluorescence from heavy atoms excited by the femtosecond pulses of an x-ray laser. Interference between emission from different atoms is expected when the pulse duration is shorter than the fluorescent lifetime. Simulations for atoms at the vertices of an icosahedral virus capsid are given, and reconstructions are presented based on phasing of the pair correlation function between photons emitted independently from many different atoms at two different detector pixels. The dependence of the pair-correlation function on the fluorescence lifetime relative to the pulse duration of the x-ray free-electron laser (XFEL) is computed, and a simple expression is obtained for the contrast of incoherent diffractive imaging speckles as a function of the XFEL's flux and lifetime. This indicates that compact XFELs, with reduced flux but sub-femtosecond pulses, should be ideally suited to atomic-resolution three-dimensional mapping of heavy atoms in materials science, chemistry, and biology.