$background = imagecreatetruecolor(709,709);
$whiteBackground = imagecolorallocate($background, 255, 255, 255);
imagecopyresampled($whiteBackground, $new_img,(709-$imageWidth)/2,(709-$imageHeight)/2, 0, 0, $imageWidth, $imageHeight, $width, $height);
ImageJpeg ($background,"$path/$newName.$file_ext", 85);
我试图用GD创建一个图像,用白色背景。但没有运气,任何想法做什么我做错了?我知道一个法师抽出来,如果我拿出whiteBackground位,所以它没有任何错误的创建图像代码。图片GD - 白色背景
感谢