Hello, I have a class of images, and there is a function that converts png images to jpg
case IMAGETYPE_PNG: $image = imagecreatefrompng($tmp); $path = $this->createdir().str_shuffle(substr(md5($tmp), 0, 20)).'.jpg'; imagejpeg($image, $this->cdndir.$path, 100); imagedestroy($image); break; but the fact is that with an envelope, if the image has a transparent background, then it is replaced with horrible multi-colored hues, or simply with black, how can you make the replacement of the transparent background with a white color?