Synchrotron radiation from runaway electron distributions in tokamaks