ok this finds the bottom in case anyone needs it; ( thanks Filip )
posterizeTime(0);
const l = thisComp.layer(“TITRE_SHOW”);
const w = l.width;
const h = l.height;
const heightLog2 = Math.ceil(Math.log(h)/Math.log(2));
const threshold = 1; // on average 1 pixel in a row is opaque to count as the bottomEdge;
var bottomEdge = h;
for(i=heightLog2; i>-1; i–) { let partition = 2 ** i; let s = l.sampleImage([w / 2, bottomEdge-partition/2], [w / 2, partition/2], false, time); if (s[3]<=threshold/(w*partition)) bottomEdge-=partition; }
[960, l.toComp([w/2, bottomEdge])[1]+50];