more robust approach to asserting square pixels