A novel, fully reconfigurable liquid collimator device for γ-ray and X-ray imaging was built and tested as a coded aperture. The device contained a 10 × 10 grid of 5 × 5 mm <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> chambers, each 5 cm long. The chambers were either grilled with an attenuating liquid, absorbing photons, or evacuated of the liquid, allowing the photons to pass. As the pattern of “on” and “off” chambers was manipulated, different, semi-independent views of the γ-ray source were found. A random mask sequence outperformed a uniformly redundant array when maximum-likelihood expectation maximization was used. Noise and reconstruction artifacts decreased as the number of masks increased. With ten mask patterns, the signal-to-noise ratio in images of point sources increased by a factor of 2. Images of a segmented, extended source are presented to demonstrate, qualitatively, that image quality increased when more masks were used. Additionally, the system crudely imaged a source using only the photons that Compton scattered within the mask.