take thumbnail border into account when calculating thumbnail size