I am writing game by using pygame in python, but some of the images are not displaying correctly. As is shown in the screenshot below, the health bar shown on the top left is not displaying well. The picture is a png file. Has any one had this issue before? Here is the way I am loading images:
pygame.display.set_caption("House Protection")
player = pygame.image.load("resources/images/Character1.png")
player2 = pygame.image.load("resources/images/Character2.png")
background = pygame.image.load("resources/images/Grass_BackGround.jpg")
house = pygame.image.load("resources/images/House.png")
bulletimage = pygame.image.load("resources/images/Bullet.png")
Enemyimage1 = pygame.image.load("resources/images/Zombie1.png")
Enemyimage2 = pygame.image.load("resources/images/Zombie2.png")
healthbar = pygame.image.load("resources/images/healthbar.png")
health = pygame.image.load("resources/images/health.png")
gameover = pygame.image.load("resources/images/gameover.png")
youwin = pygame.image.load("resources/images/youwin.png")