Replicate border instead of using a constant
Replicate border instead of using a constant

Constant border could lead to wrong values alpha values with certain
configurations.

charlievieth/resize,nfnt/resize,bradberger/resize,CodyGuo/resize,tomcartwrightuk/resize,RomanMinkin/resize,minodisk/resize