Skip to content

Get on video Capture using P2D/P3D/OPENGL renderer #203

@lmagoncalo

Description

@lmagoncalo

When using the function get() in a video capture, the returned PImage is all black when using the P2D/P3D/OPENGL renderer. However, if I switch the renderer to JAVA2D it works fine.

Code to reproduce:

import processing.video.*;

Capture cam;
PImage img;

void setup() {
  size(640, 480, P2D); // Change to JAVA2D to work

  String[] cameras = Capture.list();
 
  cam = new Capture(this, cameras[1]);
  cam.start();        
}

void draw() {
  if (cam.available() == true) {
    cam.read();
    img = cam.get();
  }
  image(img, 0, 0);
}

I am using the macOS Monterey but it also happens using a Windows 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions