-
Layer Alpha Boundary Size?
So in the Layers panel there’s a button at the bottom to show the Alpha Boundary, and when applied to a transparent image or video, the result will show that the program has determined the layer’s outermost boundaries of opaque data.
Since AE has been so great to already do this work, can I somehow get this boundary size data? I want to be able to scale a layer (with expressions) so the opaque area fills the comp window regardless of how much “dead” space is outside of it. Thanks for any ideas! ????

Something like this?
//on Scale:
sizeX = 100*thisComp.width/thisLayer.blahblahAlphaBoundary.width;
sizeY = 100*thisComp.height/thisLayer.blahblahAlphaBoundary.height;
lesserScale = Math.min(sizeX,sizeY);//only scale to nearest edge, so as not to exceed the comp size
[lesserScale,lesserScale]//set x & y the same to maintain layer aspect ratio//on Scale:
sizeX = 100*thisComp.width/thisLayer.blahblahAlphaBoundary.width;
sizeY = 100*thisComp.height/thisLayer.blahblahAlphaBoundary.height;
lesserScale = Math.min(sizeX,sizeY);//only scale to nearest edge, so as not to exceed the comp size
[lesserScale,lesserScale]//set x & y the same to maintain layer aspect ratio