Transparent to white in Imagick for PHP

后端 未结 10 1648
暗喜
暗喜 2020-12-16 11:58

I have a png image with a transparent background and I want to convert it to a jpg image with a white background.

The code is basically this:

$image          


        
10条回答
  •  独厮守ぢ
    2020-12-16 12:34

    Try this one:

    $white->newImage($image->getImageWidth(), $image->getImageHeight(), "transparent");
    

提交回复
热议问题