Add 1px border to images with pixels touching the edge of the image

Also fix scaling to work with the new border

A transparent border is needed so that the image doesn't look terrible
when rotated