A digital imaging system for beta and gamma autoradiography has been realized. It is a hybrid pixel detector based on a Medipix2 circuit (a single photon,counting chip), developed at CERN in the framework of the Medipix2 European collaboration, as a successor of the Medipix1 chip. Medipix2 is realized in 0.25-mu m CMOS technology; it has a sensitive area of 14 x 14 mm(2) and a pixel pitch of 55-mu m and is bump bonded to a 300-mu m-thick silicon pixel detector. A test of this imaging system for digital antoradiography, with a detection threshold of about 6 keV, shows a noise in the order of 10(-3) cps/mm(2), a minimum detectable activity of 0.32 Bq in 14 h for H-3, and 0.012 Bq in 10 h for C-14. A preliminary spatial resolution test for C-14 gives a full-width at half-maximum resolution of about 80 mu m. Real-time images of H-3, C-14, I-125 autoradiographic microscales are shown, and a comparison with existing experimental devices is presented.