Use a better dithering method

Fixes a bug that Tom Attic discovered where exporting to PNG8 after scaling could result in bad results like this:

![Original](http://i.imgur.com/EPUfXBl.png)   ![Scaled](http://i.imgur.com/IQdoHQv.png)