Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Create two palette images
- $palette1 = imagecreatetruecolor(200, 300);
- $palette2 = imagecreatetruecolor(100, 100);
- $green = imagecolorallocate($palette1, 0, 255, 0);
- imageline($palette1, 20, 20, 40, 40, $green);
- imageline($palette2, 10, 10, 20, 20, imagecolorallocate($palette2, 255, 0, 0));
- imagepalettecopy($palette1, $palette2);
- // Output image to the browser
- header('Content-type: image/png');
- imagepng($palette1);
- imagedestroy($palette1);
- imagedestroy($palette2);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement