The inelastic contribution to high resolution images of defects