Update image array initializer to compute values in one pass.