<?php $file='arrow.png'; $im = ImageCreate($width, $height); $im2= ImageCreateFromPng($file); $bg = ImageColorAllocate($im, 255, 0, 255); //tło imagecopy($im, $im2, 0, 0, 0, 0, $width, $height); imagepng($im); ImageDestroy($im); ?>
Plik arrow.png ma przeźroczyste tło, lecz gdy nałożę go na generowany obraz tło jest czarne, ten skrypt ma na celu zmianę tła obrazu.