The code and tests assumed the border was equaly applied around the geometry while the {x,y} pair of the geometry include the border.
The output image look fine, some `assert()` could be added.