I'm making a game, but everything works except that the image doesn't show up when I run the code. The character is supposed to start running but it doesn't. I'm getting the error: libpng warning iccp known incorrect srgb profile
here is the whole code i wish u could help me cuz i have been stuck here för the last day and plz dont judge me im new
import pygame
import os
bredd, höjd = 1100, 600
WIN = pygame.display.set_mode((bredd, höjd))
pygame.display.set_caption("naruto running")
RUNNING = [pygame.image.load(os.path.join("naruto game","run 1.png")),
pygame.image.load(os.path.join("naruto game","run 2.png"))]
JUMPING = pygame.image.load(os.path.join("naruto game","run 1.png"))
CROUCH = [pygame.image.load(os.path.join("naruto game","crouch running 1.png")),
pygame.image.load(os.path.join("naruto game","crouch running 2.png"))]
OBSTICALE = [pygame.image.load(os.path.join("naruto game","3 trees.png")),
pygame.image.load(os.path.join("naruto game","frog kakshi 2.0.png"))]
KUNAI = pygame.image.load(os.path.join("naruto game","kunai 3.1.png"))
CLOUD = pygame.image.load(os.path.join("naruto game","cloud 2.1.png"))
TRACK = pygame.image.load(os.path.join("naruto game","track 2.1.png"))
class Naruto:
X_POS=80
Y_POS=310
def __init__(self):
self.crouch_img = CROUCH
self.run_img = RUNNING
self.jump_img = JUMPING
self.naruto_running = True
self.naruto_crouch = False
self.naruto_jumping = False
self.step_index = 0
self.image = self.run_img(0)
self.naruto_rect = self.image.get_rect()
self.naruto_rect.x = self.X_POS
self.naruto_rect.y = self.Y_POS
def update(self, userInput):
if self.naruto_run:
self.run()
if self.step_index >= 10:
self.step_index = 0
if userInput[pygame.K_UP] and not self.naruto_jump:
self.naruto_duck = False
self.naruto_run = False
self.naruto_jump = True
elif userInput[pygame.K_DOWN] and not self.naruto_jump:
self.naruto_duck = True
self.naruto_run = False
self.naruto_jump = False
elif not (self.naruto_jump or userInput[pygame.K_DOWN]):
self.naruto_duck = False
self.naruto_run = True
self.naruto_jump = False
def run(self):
self.image = self.run_img[self.step_index // 5]
self.naruto_rect = self.image.get_rect()
self.naruto_rect.x = self.X_POS
self.naruto_rect.y = self.Y_POS
self.step_index += 1
def draw(self, SCREEN):
SCREEN.blit(self.imge, (self.naruto_rect.x, self.naruto_rect.y))