sheepo-designs Posted April 14, 2006 Share Posted April 14, 2006 I have made a system where either myself or my collegues can post news headlines from a password protected form. We were wondering if we could make the news page more attractive, so I decided to use watermarking to generate more attractive titles for the news. I'm having a problem with saving each watermark afters its made, though. If its possible I'd like to save them all in a directory called "headlines" and call them back on the home page where the news is displayed ( might need a little help with that, too). Thanks!Here's code I'm using:[code]Here's the HTML on a seperate page:<form method="get" action="watermark.php"> <input type="text" name="input"> <input type="submit" value="send"> </form>Here's the PHP:<?php// Set the enviroment variable for GDputenv('GDFONTPATH=' . realpath('.'));// Name the font to be used (note the lack of the .ttf extension)$font = 'Excellentia';//text string$text = $_GET["input"];//typeheader("Content-type: image/png");//create new blank image for the bg (or you can create from another image)$im = imagecreate(500, 200);//make colors$tan = imagecolorallocate($im, 139, 109, 65);//imagettftext ( resource image, float size(font size), float angle(keep @ zero), int x, int y, int color, string fontfile, string text )imagettftext($im, 30, 0, 40, 30, $tan, $font, $text);//output to browser and SAVE FILE imagepng($im,"watermark.png"); //destroy imageimagedestroy($im);?> [/code]Thanks again! Quote Link to comment Share on other sites More sharing options...
AndyB Posted April 14, 2006 Share Posted April 14, 2006 [a href=\"http://www.design-ireland.net/index.php?http%3A//www.design-ireland.net/graphics/imagery-16.php\" target=\"_blank\"]http://www.design-ireland.net/index.php?ht.../imagery-16.php[/a] has a discussion about server-side image caching which might help. Quote Link to comment Share on other sites More sharing options...
sheepo-designs Posted April 14, 2006 Author Share Posted April 14, 2006 No, that wasn't what I was looking for, but thank you for your input. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.