Bug 678 : Problems updating PImages from camera (Capture instances) in processing.video library
Last modified: 2007-11-09 15:40




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
Tom Blackwell
Assigned To:
fry

Attachment Type Created Size Actions
zip file of sketch including data application/x-zip-compressed 2007-11-09 11:14 165.40 KB
jpeg screenshot of test case sketch image/pjpeg 2007-11-09 11:15 103.57 KB

Description:   Opened: 2007-11-09 11:09
When global PImages are updated from a Capture (camera) object within draw(),
they cannot be displayed. However, if the pixels member is assigned to a local
instance of PImage it can be displayed.

I originally discovered this problem when trying to update a texture for use on an
OPENGL mesh, but it manifests when displaying the PImage using image().
Additional Comment #1 From Tom Blackwell 2007-11-09 11:14
edit]
zip file of sketch including data
Additional Comment #2 From Tom Blackwell 2007-11-09 11:15
edit]
jpeg screenshot of test case sketch
Additional Comment #3 From Tom Blackwell 2007-11-09 11:21
The problem was found in 0133. I also notice that the P3D renderer seems to hang
in draw() per the comment in setup();
Additional Comment #4 From fry 2007-11-09 14:18
read the reference for pixels[], loadPixels(), and updatePixels(). any time
that you want to work with the pixels array, you must call loadPixels, and
call updatePixels() to update any changed pixel data to the screen.
Additional Comment #5 From Tom Blackwell 2007-11-09 15:40
(In reply to comment #4)
>
>
>
> Additional Comment #4 From
>
> fry
> 2007-11-09 14:18
>
> <!--
> addReplyLink(4); //-->[reply]
>
>
>
>
> read the reference for pixels[], loadPixels(), and updatePixels().
any time
> that you want to work with the pixels array, you must call loadPixels, and
> call updatePixels() to update any changed pixel data to the screen.
>
>

Sorry to waste your time, and thank-you for the guidance; I had read the
reference for these functions, but misunderstood.