Image border correction