Capturing an image using pygame and saving it
I had a problem with respect to the capturing of a image from a webcam and saving it. I wrote a small code to do this, but on executing the program i am just getting a black(blank) image of size(640,480).
from pygame.locals import *
window = pygame.display.set_mode((640,480),0)
cam = pygame.camera.Camera(0)
image = cam.get_image()
It also opens the pygame window but that is also blank, and it goes to the NOT RESPONDING state in a seconds time. Any solutions you could suggest me regarding the above?