better coding style for ImageIO, PngIO