Fixed an issue where generated mipmaps may have a border around them.