<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Webmaster Sucks &#187; watermark images php</title>
	<atom:link href="http://www.webmastersucks.com/tags/watermark-images-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webmastersucks.com</link>
	<description>Here I share stuff I used to suck at as a novice webmaster..</description>
	<lastBuildDate>Mon, 13 Jun 2011 06:39:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Watermark All Uploaded Images in Wordpress</title>
		<link>http://www.webmastersucks.com/watermark-all-uploaded-images-in-wordpress/</link>
		<comments>http://www.webmastersucks.com/watermark-all-uploaded-images-in-wordpress/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 21:39:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[download watermark php]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[watermark]]></category>
		<category><![CDATA[watermark images]]></category>
		<category><![CDATA[watermark images php]]></category>
		<category><![CDATA[watermark images wordpress]]></category>
		<category><![CDATA[watermark wordpress]]></category>
		<category><![CDATA[watermarking]]></category>
		<category><![CDATA[wordpress watermark plugin]]></category>
		<category><![CDATA[wp glamour]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=171</guid>
		<description><![CDATA[
			
				
			
		
I need a code for watermarked all uploaded images in wordpress. I google it, and i find a solution in WP Glamour. You only add this codes and all of your upload images are watermarked. This very easy solution for watermark your images. Because if you try to add watermark with PhotoShop or another image [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fwatermark-all-uploaded-images-in-wordpress%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fwatermark-all-uploaded-images-in-wordpress%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignright size-full wp-image-177" title="Water Mark" src="http://www.webmastersucks.com/uploads/water-mark.jpg" alt="Water Mark" width="268" height="123" />I need a code for watermarked all uploaded images in wordpress. I google it, and i find a solution in <a href="http://wpglamour.com/how-to-watermark-all-your-uploaded-images/" target="_blank">WP Glamour</a>. You only add this codes and all of your upload images are watermarked. This very easy solution for watermark your images. Because if you try to add watermark with PhotoShop or another image program, it will be so hard for you.</p>
<p>Firstly create a file with name &#8220;watermark.php&#8221;, after you will add a rule to .htaccess file.</p>
<p><strong>watermark.php</strong></p>
<pre class="brush: php; title: ;">

&lt;?
$src = $_GET['src'];

header('Content-type: image/jpeg');

//this will prevent the watermark from showing up in the thumbnail images
if (eregi(&quot;150x150&quot;, $src)) {
 $watermark = imagecreatefrompng('empty.png');
} else {
 $watermark = imagecreatefrompng('watermark.png');
}
$watermark_width = imagesx($watermark);
$watermark_height = imagesy($watermark);
$image = imagecreatetruecolor($watermark_width, $watermark_height);
if(eregi('.gif',$src)) {
$image = imagecreatefromgif($src);
}
elseif(eregi('.jpeg',$src)||eregi('.jpg',$src)) {
$image = imagecreatefromjpeg($src);
}
elseif(eregi('.png',$src)) {
$image = imagecreatefrompng($src);
}
else {
exit(&quot;Your image is not a gif, jpeg or png image. Sorry.&quot;);
}
$size = getimagesize($src);
$dest_x = $size[0] - $watermark_width - 0;
$dest_y = $size[1] - $watermark_height - 0;
imagecolortransparent($watermark,imagecolorat($watermark,0,0));
imagecopyresampled($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $watermark_width, $watermark_height);

imagejpeg($image, &quot;&quot;, 95);
imagedestroy($image);
imagedestroy($watermark);
?&gt;</pre>
<p><strong>.htaccess file</strong></p>
<pre class="brush: plain; title: ;">RewriteRule ^(.*)wp-content/uploads/(.*) $1watermark.php?src=wp-content/uploads/$2</pre>
<p><a href="http://wpglamour.com/download/Watermark.zip" target="_blank">Download Source Codes &gt;</a></p>
<p><a href="http://wpglamour.com/how-to-watermark-all-your-uploaded-images/" target="_blank">Full description of script &gt;</a></p>
<p><a href="http://www.wp-watermark.com/" target="_blank">Wordpress Watermark Plugin &gt;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/watermark-all-uploaded-images-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

