[jit.grab] dimensions problem

Bill 2's icon

I must be missing something really fundamental here, so could someone please explain it or point me to the appropriate documentation?

I thought [jit.grab] was supposed to default to the device's native dimensions, in this case 1920x1080 for a Logitech HD Pro Webcam C920. But it outputs 160x90 instead. @adapt seems to be on, as expected, and changing it with an attrui makes no difference. Typing "@adapt 1" into the object itself does change it... but only to 320x240.

Adding dimension arguments, e.g. [jit.grab 640 360], seems to work, with the [jit.world] it's connected to also set to 640x360 and also seeming to work, but the image in the window is still very pixelated and still looks like 160x90.

There are other weird behaviours, but that's enough for now. What's happening, please, anyone?

Max Patch
Copy patch and select New From Clipboard in Max.

Rob Ramirez's icon

you have to use the format attribute.
check out the jit.grab help file for a working example of how to query the formatlist to create a menu of supported formats for the device, and set the desired format.

Bill 2's icon

Thanks Rob - will check it out.