note 56210 added to function.imagejpeg
| From: | php-general at lists dot php dot net | Date: | Sat, 27 Aug 2005 08:06:46 +0000 |
| Subject: | note 56210 added to function.imagejpeg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94252@lists.php.net to get a copy of this message | ||
How would I link to these images???
My script is this
// Transparency, 100 for none, 0 for not visible
$WaterMark_Transparency = "50";
// Import the images to use...
// We want the watermark to be a gif (transparency without the white.)
$WaterMark = imageCreateFromGIF("logo.gif");
$Main_Image = imagecreatefromjpeg("$img");
// Get the width and height of each image.
$Main_Image_width = imageSX($Main_Image);
$Main_Image_height = imageSY($Main_Image);
$WaterMark_width = imageSX($WaterMark);
$WaterMark_height = imageSY($WaterMark);
// This will be the position of the WaterMark
$MaterMark_x = ($Main_Image_width - $WaterMark_width);
$MaterMark_y = ($Main_Image_height - $WaterMark_height);
// We want to put the watermark on top of the main image.
imageCopyMerge($Main_Image, $WaterMark, $MaterMark_x, $MaterMark_y, 0, 0, $WaterMark_width,
$WaterMark_height, $WaterMark_Transparency);
// We want to show the image (in png format...)
ImageJPEG ($Main_Image, NULL, 100);
I found it online somewhere but I am not sure what to do in the way of displaying my pic.
I am trying to link to my images like so
<img src="watermark.php?img='.$srow['file'].'" alt="">
----
Manual Page -- http://www.php.net/manual/en/function.imagejpeg.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56210
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56210&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56210&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56210&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56210&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56210&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56210&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56210&report=yes
Search -- http://master.php.net/manage/user-notes.php