Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Working with a video frame in memory

$
0
0
The OpenGL renderers (P2D, P3D) do everything differently behind the scenes, however much work has been put into it for them to behave identically in front of the scenes. When I run the code under the P2D renderer, it gives the same result as with the default JAVA2D renderer. Are you using the latest Processing 2.0.2? Otherwise it may be an issue with your graphics card and OpenGL...

Code Example
  1. import processing.video.*;
  2.  
  3. Movie mov;
  4.  
  5. void setup() {
  6.   size(200, 200, P2D);
  7.   mov = new Movie(this, "transit.mov");
  8.   mov.loop();
  9. }
  10.  
  11. void draw() {
  12.   if (mov.available()) {
  13.     mov.read();
  14.     mov.loadPixels();
  15.     println(hex(mov.pixels[mov.height/2*mov.width+mov.width/2]));
  16.   }
  17. }

Viewing all articles
Browse latest Browse all 1768

Trending Articles