I want to load an image from webcam to display on pygame I am using videocapture
from VideoCapture import Device
import pygame
import time
In=1
pygame.init()
w = 640
h = 480
size=(w,h)
screen = pygame.display.set_mode(size)
while True:
cam = Device()
cam.saveSnapshot(str(In)+".jpg")
img=pygame.image.load(In)
screen.blit(img,(0,0))
In=int(In)+1
In=str(In)
Why does this not work.Pygame window opens but nothing displays?
See Question&Answers more detail:os