Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Set the Content Type
- header('Content-type: image/jpeg');
- // Create Image From Existing File
- //$pull_image = $_POST["imgurl"]);
- $jpg_image = imagecreatefromjpeg('/meme/ss.jpg');
- // Allocate A Color For The Text
- $white = imagecolorallocate($jpg_image, 255, 255, 255);
- // Set Path to Font File
- $font_path = "impact.ttf";
- // Set Text to Be Printed On Image
- $text = "Test Text";
- // Print Text On Image
- imagettftext($jpg_image, 25, 0, 75, 300, $white, $font_path, $text);
- // Send Image to Browser
- imagejpeg($jpg_image);
- // Clear Memory
- imagedestroy($jpg_image);
- ?>
Add Comment
Please, Sign In to add comment