Properties of cold ions produced by synchrotron radiation and by charged particle impact