@Anda
Sorry for the late replay. The past days were crazy here…
First of all, thank you for the investigation in this topic. I’m more active on GitHub, and in the future, if you find similar issues (related to under-development features) feel free to open an issue on GitHub.
Can you explain how your fix work? I calculated the result wit 3 values (width = 100) but can’t get the point:
50%: ((100 * 128) + 255) / 256 = 50.99 -> 50
100%: ((100 * 256) + 255) / 256 = 100.99 -> 100
200%: ((100 * 512) + 255) / 256 = 200.99 -> 200
So seemingly it’s equivalent to width * zoom / 256
It seems logical to round up the size to deal with the edges too.
Maybe your solution is not a full solution to the problem but definitely an improvement. So, I’d happily merge the PR!