Jump to content

How to get image size of COP2 node?


Recommended Posts

I need to know the size of the COP2 node for some input node. I can get a sequence info (TIL_Sequence) by calling getSequenceInfo member function of COP2_Node class. But it has only resolution info (getRes function), which is a visible size of the image, not an actual size.

Edited by Quantico
Link to comment
Share on other sites

OK. Thanks for your reply.

So to get the image actual size you need to write the following code:
 

int x, y, x1, y1, x2, y2;

float tm = some_node->getSequenceTime(); // ???

TIL_Sequence * seq = some_node->getSequenceInfo();

TIL_Plane plane(*seq->getPlane(some_node->getColorPlaneName()));

plane.setFormat(PXL_FLOAT32);

seq->getRes(x, y);

some_node->getImageBounds(&plane, 0, tm, x, y, 0, x1, y1, x2, y2);

Right?

Link to comment
Share on other sites

float tm = context.getTime();

Right. Or, if you have a COP2_Context in cookMyTile(), you can pass that instead of { plane, 0, tm, x,y, 0 } using the second getImageBounds() signature - If you just want the image size of the plane you're processing (or the size of the input plane). If you need to access a different plane, you need the longhand version.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...