Combustion visualizations were carried out in a constant volume vessel to study the partially premixed combustion of a gasoline-like fuel using high speed imaging. The test fuel (G80H20) is composed by volume 80% commercial gasoline and 20% n-heptane. The effects of ambient gas composition, ambient temperature and injection pressure on G80H20 combustion characteristics were analyzed. Meanwhile, a comparison of the EGR effect on combustion process between G80H20 and diesel was made. Four ambient gas conditions that represent the in-cylinder gas compositions of a heavy-duty diesel engine with EGR ratios of 0%, 20%, 40% and 60% were used to simulate EGR conditions. Variables also include two ambient temperature (910K and 870K) and two injection pressure (20 MPa and 50 MPa) conditions. Results show that the flame luminance of G80H20 decreases, ignition delay increases and ignition position moves downstream from the injector tip with increasing EGR ratio, decreasing ambient temperature and increasing injection pressure. The liquid spray length of G80H20 is much shorter than that of diesel under the same conditions. The flame luminance of G80H20 fuel decreased significantly when ambient oxygen concentration drops from 21% to 16.3% (EGR ratio: 20%). While 11.1% oxygen concentration (EGR ratio: 60%) is needed for diesel fuel to achieve a great drop in flame luminance. This is mainly because a separation of end of injection (EOI) and start of combustion (SOC) is more easily achieved with G80H20, since the ignition delay (2.7~4.5 ms) of G80H20 is longer than that (1.2~2.3 ms) of diesel.