How to get size of the matrix coming out of [jit.grab]?

Joe Kaplan's icon

Is there a way to get the size of the matrix coming out of jit.grab? I have numerous cameras set up and they are all have different aspect ratios. Is there a way to get the size of the image? I'd like to use this data to scale the jit.window while keeping the aspect ration of whatever the currently selected input is.

I know about the "getsize " message for jit.window, but that doesn't really solve the problem because once I resize the window I can no longer get the actual size of the current input. Then if I change the input I'm out of luck.

This feels like a newb question, but I can't find anything about it in jit.grab docs. Maybe I've missed it. Thanks!

Max Gardener's icon

The output of a jit.grab object is a standard matrix, unless you've specified texture output.

If you're looking for the size of the matrix, use a jit.fpsgui object. I guess you could also pass the results through a jit.matrix object/send a getdim message to the jit.matrix object, and hang a message box or a route dim object off the right-hand output of the jit.matrix object. I'm sure there are other ways to do it.

Joe Kaplan's icon

I guess you could also pass the results through a jit.matrix object/send a getdim message to the jit.matrix object, and hang a message box or a route dim object off the right-hand output of the jit.matrix object. I'm sure there are other ways to do it.

This did the trick. Simple enough if you know what you're doing. Thanks!

jit.fpsgui also worked. But that object doesn't have any outputs, so I can't do anything with the dimensions once I get them that way. Thanks for the help!

LSka's icon

There's also jit.matrixinfo

Herr Markant's icon

get dim/route dim

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