Require that 'w' matches the image width. Fixes #143
Merge pull request #145 from zcorpan/fix-143

Require that 'w' matches the image width. Fixes #143