In a substitutional alloy the positions of the lattice sites are fixed, but they may be randomly occupied by two or more different atom types. An example is the semiconductor Alx Ga1-x As, which has the group III sites arranged in columns at a (projected) distance of 0.28 nm when imaged in the [100] direction. The determination of compositions at atomic resolution would enable the study of roughness and interdiffusion at epitaxial interfaces such as GaAs/Alx Ga1-x . With high-resolution electron microscopy (HREM) it is possible to image the different columns, but it is difficult to image differences in composition. One method has been proposed so far to measure compositions from HREM images. We derive a linear relationship between deviations in composition and image contrast, and propose and test two new image processing algorithms to measure compositions in atomic columns.Consider a substitutional alloy with one atomic position occupied by either type A or type B atoms, and assume that the z -dependence of the potential can be disregarded. For the average composition an average potential V0 (dependence on (x,y ) implicit) results in an average electron wavefunction ϕo (z ) at the exit plane of the sample. Locally (e.g. in one atomic column) the composition may deviate from the average by y , causing a small deviation from the average potential of y(VA – VB ). VA and VB are the potentials when the crystal would contain only type A or type B atoms, respectively. The wavefunction can be calculated using perturbation theory, yielding formally to first order: