The transmission electron microscope (TEM) is an indispensable tool for the study of magnetic micro- and nano-structures. High resolution digital detectors have largely replaced film as the primary detection method for electron microscopy. In this study we assess the benefits of using the Medipix2 chip, bump bonded to a 300 mu m Si detector, as a flexible dual purpose detector for scanning/imaging mode operation on a Philips CM20 FEG TEM/STEM at the University of Glasgow. Specifically, the magnetic imaging modes of Fresnel and Differential phase contrast (DPC) were utilised and the performance of the Medipix chip compared to that of the CCD and the segmented photodiode normally used for these techniques. The Medipix detector matched the performance of the segmented detector for DPC imaging while offering greater flexibility in the approach. It also shown an improvement of >60 in the signal to noise performance over the CCD used for Fresnel imaging.