Flag Replacement Tutorial with Template

Hi, I have a square flag. Is there any way to resize the flag so that the black part is not there?