Converts from and to BMP, PPM and PGM.