0

透明度を維持しながら、さまざまな .png 画像を 1 つの画像に結合しようとしていますが、結合する前に各画像の不透明度を設定できません。これが私がやっていることです

$img = imagecreatefrompng($images[0]);
  imagealphablending($img, true);
  imagesavealpha($img, true);
  foreach($images as $fn) {
   $cur = imagecreatefrompng($fn);   
   imagealphablending($cur, true);
   imagesavealpha($cur, true);
   imagecopy($img, $cur, 0, 0, 0, 0, 512, 512);
   imagedestroy($cur);
  }
  imagepng($img);

どんな助けでも大歓迎です。前もって感謝します

4

0 に答える 0