Foam is used worldwide to improve acid placement in matrix acid treatments and to redirect gas flow in improved oil recovery. Gas trapping is a major factor in foam processes; it affects foam mobility and controls diversion of liquids such as acid injected after foam. Most previous studies of gas trapping have relied on fitting effluent-gas tracer profiles to a 1D model for transport of tracer in the presence of trapped gas, including mass transfer between flowing and trapped gas. We present new experiments where X-ray computed tomography (CT) directly determines the gas-tracer distribution in situ. The key is using a gas-phase tracer [xenon (Xe)] visible in CT. The CT images show clearly that the standard 1D model used to interpret tracer effluent profiles is incorrect in its assumptions. For the first time, here we compare the in-situ tracer distribution from CT images to the trapped-gas saturation estimated from fitting the effluent tracer profile to the 1D model, augmented here for the effect of pressure variation along the core. The effluent profile is determined indirectly from the CT images in two ways: (1) by imaging the tracer concentration in the flowline downstream of the core and (2) by using a mass balance on the tracer in the core. Estimates of trapped-gas fraction using the 1D model vary by as much as a factor of 0.2 among reasonable fits to the effluent data, and flowing-gas fraction varies by as much as a factor of 1.5 or 2. The experiments span a range of foam qualities and injection rates in Bentheim sandstone. Estimates of trapped-gas fraction derived from the 1D model decrease with increasing gas-injection rate and increase weakly with increasing liquid-injection rate in our experiments. The CT images show a shift to a wider variety of fluctuating flow paths as liquid- or gas-injection rate increases.