December 25th, 2013, 08:57 AM
Can someone tell me why this is happening.I'm fooling around with pygame and trying to learn on how to program,and I get an error message saying that the program does not recognize the image format.
screen = pygame.display.set_mode((200, 200))
screen.fill((255, 255, 255))
ball = pygame.image.load('raspberry.jpg').convert()
screen.blit(ball, (100, 100))
The program does not load raspberry.jpg.It says wrong format.It's in the same directory with the program.
December 26th, 2013, 12:35 PM
I recommend the imagemagick convert program to transfer pictures to formats recognized by pygame. gimp also works. Both of these are open source free programs.
[/code] are essential for python code and Makefiles!
December 26th, 2013, 02:00 PM
Your JPEG file might be corrupt, try another one.
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25