Thanks a lot, Tomas!
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).
Thanks again!