fix image conversion

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>