Made consistent api to ImageIO.