Added correct parameterization of image channels to allow for pngs (with alpha).