On a Raspberry Pi with a camera module. I'm grabbing the output from the camera OK and blitting it to a surface and that's fine. The problem is, when I call start() on the camera, it is creating a small borderless extra window in the screen with the contents of the camera. I haven't been able to see anywhere to request that this not occur and it seems that the start() is pretty essential. The code is pretty unexciting. How do I hide or disable this buffer?
import pygame
import pygame.camera
from pygame.locals import *
import time
pygame.init()
pygame.camera.init()
size1=(1920,1080)
size2=(640,480)
cam = pygame.camera.Camera("/dev/video0",size2)
cam.start()
display = pygame.display.set_mode(size2, 0)
snapshot = pygame.surface.Surface(size2, 0, display)
while True:
snapshot = cam.get_image(snapshot)
display.blit(snapshot,(0,0))
pygame.display.flip()
time.sleep(10)
It actually was perplexing me for a while because I had missed out the flip() and I thought I was just getting the image in a small size with a black border. This is running with X and not on a bare console.
As a bonus, the get_image() images have a weird color quality even though the one in the small buffer window looks a lot closer to the real colors (I've tried requesting RGB but it's exactly the same).
Additional info: Having VNCed in, this buffer is not showing in the VNC client so it seems it has something to do with the framebuffer or something?