calculate image positions even if image hasn't been drawn yet