pictor: Correctly check frame dimensions