<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Image Watermarks in WordPress</title>
	<atom:link href="http://bohuco.net/blog/2011/06/image-watermarks-in-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://bohuco.net/blog/2011/06/image-watermarks-in-wordpress/</link>
	<description>Die Sollbruchstelle des Internets.</description>
	<lastBuildDate>Sun, 05 May 2013 06:12:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
	<item>
		<title>By: Aneeq Tariq</title>
		<link>http://bohuco.net/blog/2011/06/image-watermarks-in-wordpress/#comment-298</link>
		<dc:creator>Aneeq Tariq</dc:creator>
		<pubDate>Wed, 06 Jun 2012 11:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://bohuco.net/blog/?p=1768#comment-298</guid>
		<description><![CDATA[
Watermarking an image in PHP is very easy. If you follow the code below, you can do it in 2 minutes.

&lt;?php

function watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile) {
//$SourceFile is source of the image file to be watermarked
//$WaterMarkText is the text of the watermark
//$DestinationFile is the destination location where the watermarked images will be placed

//Delete if destinaton file already exists
@unlink($DestinationFile);

//This is the vertical center of the image
$top = getimagesize($SourceFile);
$top = $top[1]/2;
list($width, $height) = getimagesize($SourceFile);

$image_p = imagecreatetruecolor($width, $height);

$image = imagecreatefromjpeg($SourceFile);

imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);

//Path to the font file on the server. Do not miss to upload the font file
$font = ‘arial.ttf’;

//Font sie
$font_size = 16;

//Give a white shadow
$white = imagecolorallocate($image_p, 255, 255, 255);
imagettftext($image_p, $font_size, 0, 10, $top, $white, $font, $WaterMarkText);

//Print in black color
$black = imagecolorallocate($image_p, 0, 0, 0);
imagettftext($image_p, $font_size, 0, 8, $top-1, $black, $font, $WaterMarkText);

if ($DestinationFile”) {

imagejpeg ($image_p, $DestinationFile, 100);

} else {

header(‘Content-Type: image/jpeg’);

imagejpeg($image_p, null, 100);

};

imagedestroy($image);

imagedestroy($image_p);

};

?&gt;

&lt;?php

$SourceFile = ‘image.jpg’;//Source image
$DestinationFile = ‘watermarked/image.jpg’;//Destination path
$WaterMarkText = ‘www.phpHelp.co’;//Watermark text

//Call the function to watermark the image
watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile);

//Display watermarked image if desired
if(file_exists($DestinationFile)){
echo “”;
echo “The image has been watermarked at ‘”.$DestinationFile.”‘”;
}
?&gt;

Note:

    This code is being provided to you as a help by http://www.phpHelp.co without any warranty and liability
    Place all the files in a folder on web server.
    Do not forget to upload the font file – arial.ttf.
    Once the image is watermarked, it will be placed in the folder named ‘watermarked’.
    You might need to give ‘write permission’ or ’777 permission’ to the folder named ‘watermarked’ as the new watermarked image will be written in this folder.


Source: 
&lt;a href=&quot;http://addr.pk/a730e&quot; rel=&quot;nofollow&quot;&gt;http://addr.pk/a730e&lt;/a&gt;
AND
&lt;a href=&quot;http://phphelp.co/2012/06/01/how-to-watermark-an-image-in-php/&quot; rel=&quot;nofollow&quot;&gt;http://phphelp.co/2012/06/01/how-to-watermark-an-image-in-php/&lt;/a&gt;
]]></description>
		<content:encoded><![CDATA[<p>Watermarking an image in PHP is very easy. If you follow the code below, you can do it in 2 minutes.</p>
<p>&lt;?php</p>
<p>function watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile) {<br />
//$SourceFile is source of the image file to be watermarked<br />
//$WaterMarkText is the text of the watermark<br />
//$DestinationFile is the destination location where the watermarked images will be placed</p>
<p>//Delete if destinaton file already exists<br />
@unlink($DestinationFile);</p>
<p>//This is the vertical center of the image<br />
$top = getimagesize($SourceFile);<br />
$top = $top[1]/2;<br />
list($width, $height) = getimagesize($SourceFile);</p>
<p>$image_p = imagecreatetruecolor($width, $height);</p>
<p>$image = imagecreatefromjpeg($SourceFile);</p>
<p>imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);</p>
<p>//Path to the font file on the server. Do not miss to upload the font file<br />
$font = ‘arial.ttf’;</p>
<p>//Font sie<br />
$font_size = 16;</p>
<p>//Give a white shadow<br />
$white = imagecolorallocate($image_p, 255, 255, 255);<br />
imagettftext($image_p, $font_size, 0, 10, $top, $white, $font, $WaterMarkText);</p>
<p>//Print in black color<br />
$black = imagecolorallocate($image_p, 0, 0, 0);<br />
imagettftext($image_p, $font_size, 0, 8, $top-1, $black, $font, $WaterMarkText);</p>
<p>if ($DestinationFile”) {</p>
<p>imagejpeg ($image_p, $DestinationFile, 100);</p>
<p>} else {</p>
<p>header(‘Content-Type: image/jpeg’);</p>
<p>imagejpeg($image_p, null, 100);</p>
<p>};</p>
<p>imagedestroy($image);</p>
<p>imagedestroy($image_p);</p>
<p>};</p>
<p>?&gt;</p>
<p>&lt;?php</p>
<p>$SourceFile = ‘image.jpg’;//Source image<br />
$DestinationFile = ‘watermarked/image.jpg’;//Destination path<br />
$WaterMarkText = ‘www.phpHelp.co’;//Watermark text</p>
<p>//Call the function to watermark the image<br />
watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile);</p>
<p>//Display watermarked image if desired<br />
if(file_exists($DestinationFile)){<br />
echo “”;<br />
echo “The image has been watermarked at ‘”.$DestinationFile.”‘”;<br />
}<br />
?&gt;</p>
<p>Note:</p>
<p>    This code is being provided to you as a help by <a href="http://www.phpHelp.co" rel="nofollow">http://www.phpHelp.co</a> without any warranty and liability<br />
    Place all the files in a folder on web server.<br />
    Do not forget to upload the font file – arial.ttf.<br />
    Once the image is watermarked, it will be placed in the folder named ‘watermarked’.<br />
    You might need to give ‘write permission’ or ’777 permission’ to the folder named ‘watermarked’ as the new watermarked image will be written in this folder.</p>
<p>Source:<br />
<a href="http://addr.pk/a730e" rel="nofollow">http://addr.pk/a730e</a><br />
AND<br />
<a href="http://phphelp.co/2012/06/01/how-to-watermark-an-image-in-php/" rel="nofollow">http://phphelp.co/2012/06/01/how-to-watermark-an-image-in-php/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aneeq Tariq</title>
		<link>http://bohuco.net/blog/2011/06/image-watermarks-in-wordpress/#comment-1870</link>
		<dc:creator>Aneeq Tariq</dc:creator>
		<pubDate>Wed, 06 Jun 2012 11:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://bohuco.net/blog/?p=1768#comment-1870</guid>
		<description><![CDATA[
Watermarking an image in PHP is very easy. If you follow the code below, you can do it in 2 minutes.

&lt;?php

function watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile) {
//$SourceFile is source of the image file to be watermarked
//$WaterMarkText is the text of the watermark
//$DestinationFile is the destination location where the watermarked images will be placed

//Delete if destinaton file already exists
@unlink($DestinationFile);

//This is the vertical center of the image
$top = getimagesize($SourceFile);
$top = $top[1]/2;
list($width, $height) = getimagesize($SourceFile);

$image_p = imagecreatetruecolor($width, $height);

$image = imagecreatefromjpeg($SourceFile);

imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);

//Path to the font file on the server. Do not miss to upload the font file
$font = ‘arial.ttf’;

//Font sie
$font_size = 16;

//Give a white shadow
$white = imagecolorallocate($image_p, 255, 255, 255);
imagettftext($image_p, $font_size, 0, 10, $top, $white, $font, $WaterMarkText);

//Print in black color
$black = imagecolorallocate($image_p, 0, 0, 0);
imagettftext($image_p, $font_size, 0, 8, $top-1, $black, $font, $WaterMarkText);

if ($DestinationFile”) {

imagejpeg ($image_p, $DestinationFile, 100);

} else {

header(‘Content-Type: image/jpeg’);

imagejpeg($image_p, null, 100);

};

imagedestroy($image);

imagedestroy($image_p);

};

?&gt;

&lt;?php

$SourceFile = ‘image.jpg’;//Source image
$DestinationFile = ‘watermarked/image.jpg’;//Destination path
$WaterMarkText = ‘www.phpHelp.co’;//Watermark text

//Call the function to watermark the image
watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile);

//Display watermarked image if desired
if(file_exists($DestinationFile)){
echo “”;
echo “The image has been watermarked at ‘”.$DestinationFile.”‘”;
}
?&gt;

Note:

    This code is being provided to you as a help by http://www.phpHelp.co without any warranty and liability
    Place all the files in a folder on web server.
    Do not forget to upload the font file – arial.ttf.
    Once the image is watermarked, it will be placed in the folder named ‘watermarked’.
    You might need to give ‘write permission’ or ’777 permission’ to the folder named ‘watermarked’ as the new watermarked image will be written in this folder.


Source: 
&lt;a href=&quot;http://addr.pk/a730e&quot; rel=&quot;nofollow&quot;&gt;http://addr.pk/a730e&lt;/a&gt;
AND
&lt;a href=&quot;http://phphelp.co/2012/06/01/how-to-watermark-an-image-in-php/&quot; rel=&quot;nofollow&quot;&gt;http://phphelp.co/2012/06/01/how-to-watermark-an-image-in-php/&lt;/a&gt;
]]></description>
		<content:encoded><![CDATA[<p>Watermarking an image in PHP is very easy. If you follow the code below, you can do it in 2 minutes.</p>
<p>&lt;?php</p>
<p>function watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile) {<br />
//$SourceFile is source of the image file to be watermarked<br />
//$WaterMarkText is the text of the watermark<br />
//$DestinationFile is the destination location where the watermarked images will be placed</p>
<p>//Delete if destinaton file already exists<br />
@unlink($DestinationFile);</p>
<p>//This is the vertical center of the image<br />
$top = getimagesize($SourceFile);<br />
$top = $top[1]/2;<br />
list($width, $height) = getimagesize($SourceFile);</p>
<p>$image_p = imagecreatetruecolor($width, $height);</p>
<p>$image = imagecreatefromjpeg($SourceFile);</p>
<p>imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);</p>
<p>//Path to the font file on the server. Do not miss to upload the font file<br />
$font = ‘arial.ttf’;</p>
<p>//Font sie<br />
$font_size = 16;</p>
<p>//Give a white shadow<br />
$white = imagecolorallocate($image_p, 255, 255, 255);<br />
imagettftext($image_p, $font_size, 0, 10, $top, $white, $font, $WaterMarkText);</p>
<p>//Print in black color<br />
$black = imagecolorallocate($image_p, 0, 0, 0);<br />
imagettftext($image_p, $font_size, 0, 8, $top-1, $black, $font, $WaterMarkText);</p>
<p>if ($DestinationFile”) {</p>
<p>imagejpeg ($image_p, $DestinationFile, 100);</p>
<p>} else {</p>
<p>header(‘Content-Type: image/jpeg’);</p>
<p>imagejpeg($image_p, null, 100);</p>
<p>};</p>
<p>imagedestroy($image);</p>
<p>imagedestroy($image_p);</p>
<p>};</p>
<p>?&gt;</p>
<p>&lt;?php</p>
<p>$SourceFile = ‘image.jpg’;//Source image<br />
$DestinationFile = ‘watermarked/image.jpg’;//Destination path<br />
$WaterMarkText = ‘www.phpHelp.co’;//Watermark text</p>
<p>//Call the function to watermark the image<br />
watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile);</p>
<p>//Display watermarked image if desired<br />
if(file_exists($DestinationFile)){<br />
echo “”;<br />
echo “The image has been watermarked at ‘”.$DestinationFile.”‘”;<br />
}<br />
?&gt;</p>
<p>Note:</p>
<p>    This code is being provided to you as a help by <a href="http://www.phpHelp.co" rel="nofollow">http://www.phpHelp.co</a> without any warranty and liability<br />
    Place all the files in a folder on web server.<br />
    Do not forget to upload the font file – arial.ttf.<br />
    Once the image is watermarked, it will be placed in the folder named ‘watermarked’.<br />
    You might need to give ‘write permission’ or ’777 permission’ to the folder named ‘watermarked’ as the new watermarked image will be written in this folder.</p>
<p>Source:<br />
<a href="http://addr.pk/a730e" rel="nofollow">http://addr.pk/a730e</a><br />
AND<br />
<a href="http://phphelp.co/2012/06/01/how-to-watermark-an-image-in-php/" rel="nofollow">http://phphelp.co/2012/06/01/how-to-watermark-an-image-in-php/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
