The present work is motivated by a need to understand the effects of the ambient environment on the sparking behavior in a spark ignition engine. Measurements of the projected density of the plasma formed by a conventional transistorized coil ignition system were conducted at the 7-BM beamline of the Advanced Photon Source at Argonne National Laboratory. A spark plug with a 1 mm gap was mounted in a grounded, pressurized chamber that was continually purged by a constant flow of gas. The x-ray radiography technique was used to obtain a 2D map of the projected density of the ambient gas during the transition and glow discharge phases of the spark plug at high temporal and spatial resolution. The projected density provides a measure of the amount of energy that is deposited into the environment by the sparking event. In order to examine the effects of the surrounding gas on the emitted thermal energy, experiments were conducted for a range of ambient densities and gas compositions. The ambient gas pressure was varied between 4 and 11 bar absolute. Experiments were conducted in ultra-zero air, as well as a mixture of air and a range of carbon dioxide concentrations with relevance to exhaust-gas recirculation (EGR) conditions.