ईमेल रिकॉर्ड : Image-based spectral distortion correction for photon-counting x-ray detectors