client: calculation of the image's side length takes into account the margins/paddings/border