Gravar-mail: Subpixel x-ray imaging with an energy-resolving detector