I have an instruction I need to do: a procedure taking into parameter two integers 'l' and 'h' (length and width)assumed positive and a filename with the corresponding extension of an image. it will create a window of 'l' length and 'h' width and will affect a random value (R,G,B form) to each of it's pixels, finally it will save this image in the current directory under the name passed into parameter
Here's my (messy) code:
def surf (l, h, imagech):
pygame.init()
ecran = pygame.display.set_mode("RGB",(l, h))
fond = pygame.image.load("MPchiffre.bmp").convert()
surface.blit(fond, (0,0))
pygame.display.flip()
continue = 1
while continue:
continue = int(input())
pixels = getPixelArray('MPchiffre.bmp')
nu.random.randint(0, 255)
pygame.image.save(surface, "imagech.bmp")
my main issue is syntax basics and basic understanding of python, I don't have time to review all of it, if someone could tell me what's wrong with this code it would be nice.