%%HP: T(3)A(R)F(.);
\<< \-> imgw imgh prtw
prth
  \<< imgw prtw /
imgh prth / \-> fst
snd
    \<<
      IF fst snd <
      THEN fst
      ELSE snd
      END
Resolution \->TAG DUP
DUP prtw * Width
\->TAG SWAP prth *
Height \->TAG ROT
    \>>
  \>>
\>>
