working image dimension calculation