Foam is used worldwide to improve acid placement in matrix acid treatments and 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 one-dimensional (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 (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: by imaging the tracer concentration in the flow line downstream of the core, and using a mass balance on tracer in the core. Estimates of trapped-gas fraction using the 1D model vary by as much as 0.2 among reasonable fits to the effluent data, and flowing gas fraction 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. Model-derived estimates of trapped-gas fraction 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.