I've been trying to figure this out for a while now and I wonder if it is actually possible through expressions.
I would like to know the resulting width and height of an image with an alpha channel (or that image inside a pre-comp), similarly as you would do with the expression for shape and text layers sourceRectAtTime().
I've tried with the sampleImage() expression, but that just gives me an average of the overall opacity.
on Jul 30, 2019 at 6:02:23 pm Last Edited By Tomas Bumbulevičius on Jul 30, 2019 at 6:05:09 pm
what about simply width & height for a layer?
EDIT: I guess you are talking about the image, assuming that all the alpha around is part of it. Sorry! There is a good script called AutoCrop, which allows crop image without affecting any of its transformation props (if that helps)
That really does the trick for the cropped image 😃
I wonder if there is a workaround to do the same for a pre-comp (with the png image already cropped). I tried with the Collapse Transformations option checked and with the same expression, but it gives me the whole height or width (in this case 1920 by 1080).