1

The code below replaces the transparent background with a black background.

imagescale() seems to cause it.

How can I get this to display without the black background after using imagescale()?

$im = imagecreatefrompng('ipad.png');   

header('Content-type: image/png');  

$im = imagescale($im, 300);

imagepng($im);   
Jordan
  • 1,422
  • 1
  • 11
  • 21
  • Yes, it turns out you are right. I had already read that answer and tried to make it apply, but couldn't get it to work. But I went back over it again. I misunderstood that imagecopyresampled takes the place of imagescale. Now it works! – Jordan Jul 05 '19 at 14:48

0 Answers0