Refactor convertImage to use an object for the conversion options

Feel free to wait with merging this until we fully make the split and put this into generator-core.