In a very rare case where the edge off the stamp just intersects the edge of the image (1 pixel total overlap), the differences between to_index() and (int) can cause different rounding where the to_index() mapping is inside the image, but the (int) one is not. In this case the code crashes because we are bounds checking on the to_index()values, but building the anchored block from the (int) values.
In a very rare case where the edge off the stamp just intersects the edge of the image (1 pixel total overlap), the differences between
to_index()
and(int)
can cause different rounding where theto_index()
mapping is inside the image, but the(int)
one is not. In this case the code crashes because we are bounds checking on theto_index()
values, but building the anchored block from the(int)
values.