Reputation: 11
After i was write this simple code to load ball.png Pygame says known sRGB profile
.After that i was converted that image use Image Magic Display tool. but pygame not loading this image.
import pygame
import random
import sys
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode((500,300))
pygame.display.set_caption("Tower Game By Akila")
backgroundImg = pygame.image.load('background.jpg')
ballImg = pygame.image.load("ball.png").convert()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
screen.blit(ballImg, (0,0))
screen.blit(backgroundImg,(0,0))
pygame.display.update()
Upvotes: 0
Views: 257
Reputation: 129
Looks like you are drawing the ball first, and then the background image over it. Try changing the order of the screen.blit drawing so it is the background first, and then the ball:
screen.blit(backgroundImg,(0,0))
screen.blit(ballImg, (0,0))
Upvotes: 4