Usually the spacer height is measured from the top of the headset's upper race to the underside of the stem rather than from the top of the head tube to the top cap. Anyway, from your photo that distance seems to be about 40 mm which should be fine for a 1-1/8" steerer. And, actually, if you install the stem so 4 mm of steerer projects above it, that makes the spacer stack even more conservative.