I need either PHP script or some other maybe .htaccess code which does the following: put a logo on site's images i should be able to specify on images of which folder the logo should appear i need to be able to specify the logo file, which in its turn can be transparent seems this is all. let me know if you have questions. please PM me your quote and how much time you need to make it.
I think its a watermark thats required ? Check out http://articles.sitepoint.com/article/watermark-images-php
exactly here is a sample: since I am not into PHP I would like someone to help me and I am willing to pay for it. My site uses WordPress if that makes a change not sure how the sitepoint example does that but maybe that is what I need
thanks it worked, BUT I would still prefer something automated, this plugin only helps if I want to do it manually
it's possible to do with PHP for sure and that's not a hard thing to do.. firs you need to create a file namedfor ex. watermark.php and you will have to have the watermark image, say watermark.gif (it can also be *.jpg or *.png) in the same directory as watermark.php is.. if you want to have a transparent watermark then you will have to create a watermark image in GIF format and set the background transparent (actually it's possible to have a watermark image with transparent background in a PNG format)... so.. 1. first you open the watermark.php and copy and paste down the following code: <?php header('content-type: image/jpeg'); //point the browser that we are going to pass an image file to is :) $imagesource = $_GET['path']; //gets the image source that you are going to water mark $extension = substr($imagesource,strlen($imagesource)-4,4); //gets the extension of the image to determine which filter to use $extension = strtolower($extension); //saves the extension in $filetype variable //in next three steps it checks to see what is the extension if($extension == ".gif") $image = @imagecreatefromgif($imagesource); if($extension == ".jpg") $image = @imagecreatefromjpeg($imagesource); if($extension == ".png") $image = @imagecreatefrompng($imagesource); if (!$image) die(); //if nothing matches stops the script $watermark = @imagecreatefromgif('watermark.gif'); //you might have to change this line to $watermark = @imagecreatefrompng('watermark.png') or to jpeg if your watermark image is not gif $imagewidth = imagesx($image); //gets the image width of the picture you are going to watermark $imageheight = imagesy($image); //gets the height of the picture you are going to watermark $watermarkwidth = imagesx($watermark); //gets the width of the watermark image $watermarkheight = imagesy($watermark); //gets the height of the watermark image //the followin two lines set the watermark location.. here it is set as you needed it.. right bottom corner $startwidth = (($imagewidth - $watermarkwidth) ); $startheight = (($imageheight - $watermarkheight) ); //put the watermark on the image and saves the watermarked image as a JPG file imagecopy($image, $watermark, $startwidth, $startheight, 0, 0, $watermarkwidth, $watermarkheight); imagejpeg($image); imagedestroy($image); imagedestroy($watermark); ?> PHP: that's all.. now a little about how to se it. $imagesource = $_GET['path']; gets the path of the image to be marked, so to pass the image path to this line you have to put it like this in your code: <img src="watermark.php?path=image_name.extension"> where image_name.extension is the name of the file you want to watermark i.e. myimage.jpg.. in case when your image is in the folder other then script or even the page that needs to use the script is not in the same folder with script you can just change that line like this: <img src="script_folder_name/watermark.php?path=image_folder_name/image_name.extension"> just remember to keep the watermark image and script together in the same folder.. sure you can not do that by changing the watermark image path here $watermark = @imagecreatefromgif('watermark.gif'); .. but it's more relyable to have them in the same folder I have attached s sample with watermark image and image to be watermarked and script of course enjoy and let me know if that worked for you
This one works Give me your paypal via PM I would like to make a tiny present for your time Check it out guys: http://www.mobileinfos.com/ It does work for the newly uploaded images