Jump to: Board index » General » Fusion

Can I get image size information from Loader node?

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

Abdelrahman Magdy

  • Posts: 291
  • Joined: Fri Jan 23, 2015 10:08 pm

Can I get image size information from Loader node?

PostTue Mar 07, 2017 11:38 am

I am doing a simple macro for a repetitive task I do. It mainly consists of merging background nodes using Channel Boolean over the source footage. The problem I am having is that the source footage are not all the same size, and for the merge to work accurately, I need the Background nodes' size to be exactly as the original image.

Since the Loader doesn't have size information in the node itself, I am currently using a Resize node that drive the size of the background nodes I am using, but the problem is, I have to manually enter the size of the source footage if it is different from the default Frame Format settings. It is not that tough, but I think there is a better way to do it using expressions or the Custom Tool. I tried finding something online or in the manual, but without any luck.

Can anyone help?
System specs:
Resolve Studio version: 16.1.0.055
Fusion Studio version: 9.0.2
OS: CentOS 7
CPU: Intel i7-4790k 4GHz Quad-Core
RAM: 32GB
GPU: NVIDIA GeForce 1080 Ti 11GB
Offline
User avatar

Andrew Hazelden

  • Posts: 538
  • Joined: Sat Dec 06, 2014 12:10 pm
  • Location: West Dover, Nova Scotia, Canada

Re: Can I get image size information from Loader node?

PostTue Mar 07, 2017 3:39 pm

Connect your loader node to the background input on a merge node. The merge node will return the current width and height of the connected footage using the following two expression variables:

Merge1.Background.OriginalWidth
Merge1.Background.OriginalHeight

These values can then be used in expressions in the rest of your comp.
Mac Studio M2 Ultra / Threadripper 3990X | Fusion Studio 18.6.4 | Kartaverse 6
Offline

Abdelrahman Magdy

  • Posts: 291
  • Joined: Fri Jan 23, 2015 10:08 pm

Re: Can I get image size information from Loader node?

PostTue Mar 07, 2017 4:10 pm

Thank you very much, Andrew.
System specs:
Resolve Studio version: 16.1.0.055
Fusion Studio version: 9.0.2
OS: CentOS 7
CPU: Intel i7-4790k 4GHz Quad-Core
RAM: 32GB
GPU: NVIDIA GeForce 1080 Ti 11GB
Offline
User avatar

Chad Capeland

  • Posts: 3025
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: Can I get image size information from Loader node?

PostTue Mar 07, 2017 11:21 pm

Loader1.Output.OriginalWidth should work too, though.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Abdelrahman Magdy

  • Posts: 291
  • Joined: Fri Jan 23, 2015 10:08 pm

Re: Can I get image size information from Loader node?

PostFri Mar 10, 2017 3:12 pm

Thank you very much, Chad. This is really brilliant. It actually works on other nodes (other than the Loader I mean) as well.
System specs:
Resolve Studio version: 16.1.0.055
Fusion Studio version: 9.0.2
OS: CentOS 7
CPU: Intel i7-4790k 4GHz Quad-Core
RAM: 32GB
GPU: NVIDIA GeForce 1080 Ti 11GB
Offline

Tom Early

  • Posts: 2688
  • Joined: Wed Jul 17, 2013 11:01 am

Re: Can I get image size information from Loader node?

PostSat May 02, 2020 7:21 pm

Thanks guys. Just to add, for anyone pulling their hair out trying to figure out how to have text show image dimensions and have come here via a google search, the expression is:

Text(Merge1.Background.Width.."x"..Merge1.Background.Height)

and just replace Merge1.Background.Width and Height as appropriate, bearing in mind previous replies.

The .. act as separators for different data, that's where I was going wrong.
MBP2021 M1 Max 64GB, macOS 14.4, Resolve Studio 18.6.6 build 7
Output: UltraStudio 4K Mini, Desktop Video 12.7
Offline
User avatar

Bryan Ray

  • Posts: 2491
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Can I get image size information from Loader node?

PostSun May 03, 2020 3:35 pm

To be more precise, .. is the string concatenation operator. It is used to connect two bits of text to one another. You could write:

"Text portion 1 ".."is connected to text portion 2."

The result would simply be "Text portion 1 is connected to text portion 2." That's simplistic, of course. It's more often used as you see there, where you're connecting text stored in variables:

Code: Select all
software = "Fusion"
comparison = "less"

print(software.." sucks "..comparison..".")


That will print "Fusion sucks less."
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com

Return to Fusion

Who is online

Users browsing this forum: No registered users and 43 guests