Fitting images and adding a border to textures