Anyways, here is the code I am using to create the background for the top of a web page, 120px high. The final png is made up of smaller 5px high pngs that have a slight color change, giving the final effect of a little fade, if you will....
Expand|Select|Wrap|Line Numbers
- header ("Content-type: image/png");
- $bg = imagecreatetruecolor(100, 120);
- $back = imagepng($bg, "bg.png");
- $back = imagecreatefrompng("bg.png");
- $color = 232;
- $x = 0;
- while ($x < 120) {
- $im = imagecreatetruecolor(100, 5);
- $fill = imagecolorallocate($im, 0, 0, $color);
- imagefill($im, 0, 0, $fill);
- imagepng($im, "add.png");
- $one = imagecreatefrompng("add.png");
- imagecopy($back, $one, 0, $x, 0, 0, 100, 10);
- imagepng($back, "bg.png");
- $x = $x + 5;
- $color = $color + 1;
- imagedestroy($im);
- imagedestroy($one);
- }
- imagepng($back);
- imagedestroy($back);
- imagedestroy($bg);
- ?>
Any thoughts on why this might be or what is causing this?