Scanning tunneling microscopy imaging of amorphous and crystalline D2O ice on Cu(111) is discussed with respect to the apparent and the real heights of these structures above the metal surface. The apparent height increases linearly below the conduction band onset of amorphous ice and the first image state of crystalline ice, respectively. However, it largely underestimates the real height. For these voltages, histograms of the apparent height can be used to identify different layers. The dependence of the apparent height on voltage increases step-like up to the real height at the onsets of the first unoccupied electronic state. Apparent height spectroscopy is utilized to relate the apparent height to the real height of the different structures. The analysis reveals the layering during growth of porous amorphous ice between 0.1 and 1.4 BL and the dynamics of crystallization between 130 and 145 K.DF