Move convertImage to utilities and fix a regression (that ended up fixing even more bugs in Canabalt.)