Replies: 2 comments 2 replies
-
|
Moving to discussions ... This is a little complicated because there are multiple types of What type of component are you using? Where is the PImage from - an input port or a file? You can get access to the underlying Processing PImage in a video GL component by calling. var pimage = image.find(processing.core.PImage.class).orElse(null);It should never be null in this case, however the pixel data doesn't seem to work with an image loaded from a file. I need to look at that. There is a simpler way to get access to the underlying var pgraphics = g.unwrap();I've used |
Beta Was this translation helpful? Give feedback.
-
|
OK, I think I've found a solution for this. We need to work around the fact that the The only solution I can think of right now is to use an offscreen scratch buffer that PraxisLIVE manages, draw the camera to that, and then read the pixels from it. The following graph code should show the general idea - I also added and exposed the read-only value as hex for testing - If you only need one specific pixel, you could optimize this by using a 1x1 image to limit the amount of data that needs to be read back. Likewise, you could scale the image. Hope that helps you get going with this! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Im trying to get the color of one particular pixel from a PImage but there is not PImage.get(x,y) neither loadPixels neither getNative.
Is there any workaround to acces this data?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions