Ultra-high-resolution CCD-based gamma detection