In the present work the influence of the amount and size distribution of blowing agent particles (magnesium hydride, MgH2) on the resulting pore structure of aluminum foams is studied. A modified die casting process called integral foam moulding (IFM) is used where aluminum melt mixed with blowing agent is injected into a mould cavity. High cooling rates at the wall of the die result in the formation of a dense shell, whereas, the decomposition of the blowing agent in the inner region leads to a cellular core. Different particle size fractions of MgH2 are provided by sieving; the resulting pore structures of the foams are analyzed by microcomputed tomography. The results suggest that the pore size distribution represents a direct image of the size distribution of the used powder as well as of the particle density within the melt. This finding allows the production of homogeneous microcellular foams by using a high number of particles with a narrow size distribution.