Remove black borders from images