Ultralow-dose, x-ray or gamma-ray imaging is based on fast, electronic control of the output of a laser-Compton x-ray or gamma-ray source (LCXS or LCGS). X-ray or gamma-ray shadowgraphs are constructed one (or a few) pixel(s) at a time by monitoring the LCXS or LCGS beam energy required at each pixel of the object to achieve a threshold level of detectability at the detector. An example provides that once the threshold for detection is reached, an electronic or optical signal is sent to the LCXS/LCGS that enables a fast optical switch that diverts, either in space or time the laser pulses used to create Compton photons. In this way, one prevents the object from being exposed to any further Compton x-rays or gamma-rays until either the laser-Compton beam or the object are moved so that a new pixel location may be illumination.