Quantico Posted March 24, 2019 Share Posted March 24, 2019 (edited) 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 March 26, 2019 by Quantico Quote Link to comment Share on other sites More sharing options...
malexander Posted March 28, 2019 Share Posted March 28, 2019 You want to call COP2_Node::getImageBounds(). The bounds can be different per plane, unlike the res, so the plane must be specified. Quote Link to comment Share on other sites More sharing options...
Quantico Posted March 28, 2019 Author Share Posted March 28, 2019 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? Quote Link to comment Share on other sites More sharing options...
malexander Posted March 28, 2019 Share Posted March 28, 2019 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. Quote Link to comment Share on other sites More sharing options...
Quantico Posted March 28, 2019 Author Share Posted March 28, 2019 OK. Thanks. I thought there is a more convenient way to just get image dimensions Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.