Re: Help with gd

From: Date: Thu, 03 Apr 2003 13:33:57 +0000
Subject: Re: Help with gd
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-19268@lists.php.net to get a copy of this message
Hi Achilles - try something like this (you will have to read the exact syntax in the manual cause its quite involved but ovious if you're logical about it) : <?php $im = ImageCreateFromJPEG("$imagepath/$imagename") // Create a gd image ($im) first. $imtext=ImageCreate (100,22); // Make new, blank image 100x22px for text $black = ImageColorAllocate ($imtext, 100, 100, 100); // Set black point (some level of grey) $white = ImageColorAllocate ($imtext, 255, 255, 255); // Set white point $coords=ImageTTFText ($imtext,10,0,4,16,$white,$fontpath."arial.ttf","&#169; Copyrightmessage here 2003"); // Make TTF text and overlay it onto the image. // Adjust $fontpath to your actual fonts directory. ImageCopyMergeGray ($im, $imtext, 0, $newheight-22, 0,0,$newwidth,22,33); // Centre text within image : Vary left & top parameters as required. header("Content-type: image/jpeg"); ImageJPEG($im); ?> Hope that helps (it works for me :-) Cheers, Neil Smith. At 12:37 03/04/2003 +0000, you wrote:
From: "Achilles Maroulis" <achmar@ath.forthnet.gr> To: <php-windows@lists.php.net> Date: Wed, 2 Apr 2003 17:41:29 +0300 MIME-Version: 1.0 Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit Subject: Re: [PHP-WIN] Help with gd Hi again... Thanx everyone who read the topic and answered.... ...but noone answered my question... is there a way I can insert a watermark on a jpg with gd??? Maybe it's because there isn't a solution for my problem.


« previous php.windows (#19268) next »