Swap the WIDTH and HEIGHT parameters in the resize() function