The only other (besides sourceRectAtTime()) tool I know of is sampleImage(). It’s really inefficient because it has to do a lot of calculations, but you can use it to find the non-zero alpha extents of your layer. This expression will give you the left, right, top, and bottom extents. You’ll need to tailor it to your exact requirements.
L = thisComp.layer("target");
h = L.height/2;
w = L.width/2;
for (i = 0; i < L.width; i++){
if (L.sampleImage([i,h],[.5,h])[3]>0) break;
}
left = i;
for (i = L.width-1; i >= 0; i--){
if (L.sampleImage([i,h],[.5,h])[3]>0) break;
}
right = i;
for (i = 0; i < L.height; i++){
if (L.sampleImage([w,i],[w,.5])[3]>0) break;
}
top = i;
for (i = L.height-1; i >= 0; i--){
if (L.sampleImage([w,i],[w,.5])[3]>0) break;
}
bottom = i;