Context. The gamma rays detected by passive balloon-borne emulsion chambers in the stratosphere give additional information on primary cosmic ray composition and allow indirect testing of the conclusions based on the study of the primary particle tracks. Aims. We search for a consistent view of the balloon experiments with traditional calorimeter-type emulsion conducted at various atmospheric depths in the stratosphere. Using analytical calculation, we test two models of primary composition based on experimental information given by these experiments. Methods. We analyze original experimental data relevant for the inquiry, consider the risk of empirical and methodical bias, and test the consistency of data sets with different hypotheses. Results. It is shown that observed experimental data on gamma rays are in agreement with the atmospheric origin of their production. We notice that observed experimental signals in the energy region above 10 TeV can be an indication of an increase of heavy primaries. However, quantitative analysis does not show statistically significant evidence in favor of one specific composition model.