Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
88
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None
  1. <?php
  2. // Create two palette images
  3. $palette1 = imagecreatetruecolor(200, 300);
  4.  
  5. $palette2 = imagecreatetruecolor(100, 100);
  6.  
  7. $green = imagecolorallocate($palette1, 0, 255, 0);
  8.  
  9. imageline($palette1, 20, 20, 40, 40, $green);
  10. imageline($palette2, 10, 10, 20, 20, imagecolorallocate($palette2, 255, 0, 0));
  11.  
  12. imagepalettecopy($palette1, $palette2);
  13. // Output image to the browser
  14. header('Content-type: image/png');
  15.  
  16. imagepng($palette1);
  17. imagedestroy($palette1);
  18. imagedestroy($palette2);
  19. ?>
Advertisement
RAW Paste Data Copied
Advertisement