search

Home  >  Q&A  >  body text

php - How to change the size of a transparent image

I used the following method to turn the entire transparent image into black.
$path_1 = './image/1.jpg';
// Picture 2
$path_2 = './image/2.jpg'; ;
//Create image object
$image_1 = imagecreatefromjpeg($path_1);

$image_x1 =imagecreatetruecolor(525, 525);
imagecopyresampled($image_x1, $image_1, 0, 0, 0, 0,525,525,imagesx($image_1), imagesy($image_1));
我想大声告诉你我想大声告诉你2844 days ago430

reply all(1)I'll reply

  • 漂亮男人

    漂亮男人2017-05-16 13:03:45

    You can use css -webkit-mask-image to mask it

    reply
    0
  • Cancelreply