Handle rotation in padding (aspect-ratio) computation

WARNING: still far away from a working setup