X-ray Imaging of Stress and Strain of Diamond, Iron, and Tungsten at Megabar Pressures