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

This reverts commit 086940dbe3cec2ec0f230310fba10278a48dde39.