<?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>Asido &#187; Watermark</title>
	<atom:link href="http://asido.info/category/howto/watermark/feed/" rel="self" type="application/rss+xml" />
	<link>http://asido.info</link>
	<description>PHP Image Processing Solution</description>
	<lastBuildDate>Tue, 02 Jun 2009 10:48:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Watermarks w/ GIFs and JPEGs</title>
		<link>http://asido.info/howto/watermark/gif-jpeg/</link>
		<comments>http://asido.info/howto/watermark/gif-jpeg/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 19:32:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Watermark]]></category>

		<guid isPermaLink="false">http://www.asido.info/howto/watermark/gif-jpeg/</guid>
		<description><![CDATA[This example shows the result when using non-transparent images like JPEGs, or using files with non-alpha transparency like GIFs. ]]></description>
			<content:encoded><![CDATA[<p>This example shows the result from applying <a href="http://www.asido.info/about/features/#watermark">watermark</a> when using non-transparent images like JPEGs, or using files with non-alpha transparency like GIFs. </p>
<p>Pay attention to the JPEG watermark: probably you all know it, but let me put these words of wisdom again &#8211; do not use JPEGs and  plain flat colors. When the JPEG compression is applied, it tries to smoothen the image and this f*cks up the areas covered with flat color.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Include the main Asido class
*/</span>
<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./../../class.asido.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Set the correct driver: this depends on your local environment
*/</span>
asido<span style="color: #339933;">::</span><span style="color: #004000;">driver</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'gd'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Create an Asido_Image object and provide the name of the source
* image, and the name with which you want to save the file
*/</span>
<span style="color: #000088;">$i1</span> <span style="color: #339933;">=</span> asido<span style="color: #339933;">::</span><span style="color: #004000;">image</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'example.jpg'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'result_05.jpg'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Put a JPEG watermark image
*/</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'watermark_05.jpg'</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_TOP_LEFT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Put a GIF watermark image
*/</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'watermark_05.gif'</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_BOTTOM_RIGHT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Save the result
*/</span>
<span style="color: #000088;">$i1</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span>ASIDO_OVERWRITE_ENABLED<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Here you can see the source image, the watermark image, and the result:</p>
<div class="preview">
<a target="_blank" href="http://www.asido.info/examples/watermark/example.jpg" rel="lightbox[roadtrip]" title="Source Image">&nbsp;<img src="http://www.asido.info/examples/watermark/example_thumb.jpg" alt="Source Image" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/watermark_05.gif" rel="lightbox[roadtrip]" title="GIF Watermark">&nbsp;<img src="http://www.asido.info/examples/watermark/watermark_05_thumb.gif" alt="GIF Watermark" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/watermark_05.jpg" rel="lightbox[roadtrip]" title="JPEG Watermark">&nbsp;<img src="http://www.asido.info/examples/watermark/watermark_05_thumb.jpg" alt="JPEG Watermark" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/expected_result_05.jpg" rel="lightbox[roadtrip]" title="Result">&nbsp;<img src="http://www.asido.info/examples/watermark/expected_result_05_thumb.jpg" alt="Result" /></a>
</div>
<div style="clear:left;"></div>
<p>You can download the source for this example from here:<br />
<a target="_blank" href="http://www.asido.info/examples/watermark/example_05.phps">http://www.asido.info/examples/watermark/example_05.phps</a></p>
]]></content:encoded>
			<wfw:commentRss>http://asido.info/howto/watermark/gif-jpeg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Watermark Scaling w/ Scaling Factor</title>
		<link>http://asido.info/howto/watermark/scaling-factor/</link>
		<comments>http://asido.info/howto/watermark/scaling-factor/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 19:29:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Watermark]]></category>

		<guid isPermaLink="false">http://www.asido.info/howto/watermark/scaling-factor/</guid>
		<description><![CDATA[This example shows how the watermark scaling factor works.]]></description>
			<content:encoded><![CDATA[<p>There are situations in which it turns out that the <a href="http://www.asido.info/about/features/#watermark">watermark</a> image is considerable larger compared to the image that is going to be watermarked. In these scenarios <strong><a title="Asido is a PHP (PHP4/PHP5) image processing solution" target="_blank" href="http://sourceforge.net/projects/asido/">Asido</a></strong> applies <em><a href="http://www.asido.info/about/features/#watermark">watermark</a> scaling.</em> This means that the <a href="http://www.asido.info/about/features/#watermark">watermark</a> is resized so its dimensions become some portion of the image that is going to be watermarked. This feature can be turned on and off by using the <font face="Courier New" color="#800080">ASIDO_WATERMARK_SCALABLE_ENABLED</font> and <font face="Courier New" color="#800080">ASIDO_WATERMARK_SCALABLE_DISABLED</font> constants. By default, the featured is enabled, and the scaling factor is taken from the <font face="Courier New" color="#800080">ASIDO_WATERMARK_SCALABLE_FACTOR</font> constant. If you want you can re-define this constant, or just provide a decimal value (0 &lt; scaling_factor &lt; 1) instead. By default, the scaling factor is 0.25 (1/4).</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Include the main Asido class
*/</span>
<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./../../class.asido.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Set the correct driver: this depends on your local environment
*/</span>
asido<span style="color: #339933;">::</span><span style="color: #004000;">driver</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'gd'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Create an Asido_Image object and provide the name of the source
* image, and the name with which you want to save the file
*/</span>
<span style="color: #000088;">$i1</span> <span style="color: #339933;">=</span> asido<span style="color: #339933;">::</span><span style="color: #004000;">image</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'example.jpg'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'result_04.jpg'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Put the watermark with the scaling factor 0.66
*/</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'watermark_04.png'</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_TOP_LEFT<span style="color: #339933;">,</span> ASIDO_WATERMARK_SCALABLE_ENABLED<span style="color: #339933;">,</span> <span style="color:#800080;">0.66</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Put the watermark with the scaling factor 0.75
*/</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'watermark_04.png'</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_BOTTOM_RIGHT<span style="color: #339933;">,</span> ASIDO_WATERMARK_SCALABLE_ENABLED<span style="color: #339933;">,</span> <span style="color:#800080;">0.75</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Save the result
*/</span>
<span style="color: #000088;">$i1</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span>ASIDO_OVERWRITE_ENABLED<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Here you can see the source image, the watermark image, and the result:</p>
<div class="preview">
<a target="_blank" href="http://www.asido.info/examples/watermark/example.jpg" rel="lightbox[roadtrip]" title="Source Image">&nbsp;<img src="http://www.asido.info/examples/watermark/example_thumb.jpg" alt="Source Image" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/watermark_04.png" rel="lightbox[roadtrip]" title="Watermark">&nbsp;<img src="http://www.asido.info/examples/watermark/watermark_04_thumb.png" alt="Watermark" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/expected_result_04.jpg" rel="lightbox[roadtrip]" title="Result">&nbsp;<img src="http://www.asido.info/examples/watermark/expected_result_04_thumb.jpg" alt="Result" /></a>
</div>
<div style="clear:left;"></div>
<p>You can download the source for this example from here:<br />
<a target="_blank" href="http://www.asido.info/examples/watermark/example_04.phps">http://www.asido.info/examples/watermark/example_04.phps</a></p>
]]></content:encoded>
			<wfw:commentRss>http://asido.info/howto/watermark/scaling-factor/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Watermark Scaling</title>
		<link>http://asido.info/howto/watermark/scaling/</link>
		<comments>http://asido.info/howto/watermark/scaling/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 19:24:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Watermark]]></category>

		<guid isPermaLink="false">http://www.asido.info/howto/watermark/scaling/</guid>
		<description><![CDATA[This example shows how the watermark scaling works: another one of <strong><a href="http://sourceforge.net/projects/asido/" title="Asido is a PHP (PHP4/PHP5) image processing solution" target="_blank">Asido</a></strong> unique features.]]></description>
			<content:encoded><![CDATA[<p>This example shows how the <a href="http://www.asido.info/about/features/#watermark">watermark</a> scaling works: another one of <strong><a href="http://sourceforge.net/projects/asido/" title="Asido is a PHP (PHP4/PHP5) image processing solution" target="_blank">Asido</a></strong> unique features. This feature is turned on by default and it is very handy when the <a href="http://www.asido.info/about/features/#watermark">watermark</a> image is considerable larger then the image that is about to be watermarked.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Include the main Asido class
*/</span>
<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./../../class.asido.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Set the correct driver: this depends on your local environment
*/</span>
asido<span style="color: #339933;">::</span><span style="color: #004000;">driver</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'gd'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Create an Asido_Image object and provide the name of the source
* image, and the name with which you want to save the file
*/</span>
<span style="color: #000088;">$i1</span> <span style="color: #339933;">=</span> asido<span style="color: #339933;">::</span><span style="color: #004000;">image</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'example.jpg'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'result_03.jpg'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Put the watermark with the scaling feature enabled
*/</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'watermark_03.png'</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_BOTTOM_RIGHT<span style="color: #339933;">,</span> ASIDO_WATERMARK_SCALABLE_ENABLED<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Put the watermark with the scaling feature disabled
*/</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'watermark_03.png'</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_CENTER<span style="color: #339933;">,</span> ASIDO_WATERMARK_SCALABLE_DISABLED<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Save the result
*/</span>
<span style="color: #000088;">$i1</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span>ASIDO_OVERWRITE_ENABLED<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Here you can see the source image, the watermark image, and the result:</p>
<div class="preview">
<a target="_blank" href="http://www.asido.info/examples/watermark/example.jpg" rel="lightbox[roadtrip]" title="Source Image">&nbsp;<img src="http://www.asido.info/examples/watermark/example_thumb.jpg" alt="Source Image" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/watermark_03.png" rel="lightbox[roadtrip]" title="Watermark">&nbsp;<img src="http://www.asido.info/examples/watermark/watermark_03_thumb.png" alt="Watermark" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/expected_result_03.jpg" rel="lightbox[roadtrip]" title="Result">&nbsp;<img src="http://www.asido.info/examples/watermark/expected_result_03_thumb.jpg" alt="Result" /></a>
</div>
<div style="clear:left;"></div>
<p>You can download the source for this example from here:<br />
<a target="_blank" href="http://www.asido.info/examples/watermark/example_03.phps">http://www.asido.info/examples/watermark/example_03.phps</a></p>
]]></content:encoded>
			<wfw:commentRss>http://asido.info/howto/watermark/scaling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tile Watermark</title>
		<link>http://asido.info/howto/watermark/tile/</link>
		<comments>http://asido.info/howto/watermark/tile/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 19:04:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Watermark]]></category>

		<guid isPermaLink="false">http://www.asido.info/howto/watermark/tile/</guid>
		<description><![CDATA[This example demonstrates an unique feature of <strong><a href="http://sourceforge.net/projects/asido/" title="Asido is a PHP (PHP4/PHP5) image processing solution" target="_blank">Asido</a></strong> to apply a tile watermark.]]></description>
			<content:encoded><![CDATA[<p>This example demonstrates an unique feature of <strong><a href="http://sourceforge.net/projects/asido/" title="Asido is a PHP (PHP4/PHP5) image processing solution" target="_blank">Asido</a></strong> to apply a tile <a href="http://www.asido.info/about/features/#watermark">watermark</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Include the main Asido class
*/</span>
<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./../../class.asido.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Set the correct driver: this depends on your local environment
*/</span>
asido<span style="color: #339933;">::</span><span style="color: #004000;">driver</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'gd'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Create an Asido_Image object and provide the name of the source
* image, and the name with which you want to save the file
*/</span>
<span style="color: #000088;">$i1</span> <span style="color: #339933;">=</span> asido<span style="color: #339933;">::</span><span style="color: #004000;">image</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'example.jpg'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'result_02.jpg'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Put a &quot;tile&quot; watermark image
*/</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'watermark_02.png'</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_TILE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Save the result
*/</span>
<span style="color: #000088;">$i1</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span>ASIDO_OVERWRITE_ENABLED<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Here you can see the source image, the watermark image, and the result:</p>
<div class="preview">
<a target="_blank" href="http://www.asido.info/examples/watermark/example.jpg" rel="lightbox[roadtrip]" title="Source Image">&nbsp;<img src="http://www.asido.info/examples/watermark/example_thumb.jpg" alt="Source Image" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/watermark_02.png" rel="lightbox[roadtrip]" title="Watermark">&nbsp;<img src="http://www.asido.info/examples/watermark/watermark_02.png" alt="Watermark" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/expected_result_02.jpg" rel="lightbox[roadtrip]" title="Result">&nbsp;<img src="http://www.asido.info/examples/watermark/expected_result_02_thumb.jpg" alt="Result" /></a>
</div>
<div style="clear:left;"></div>
<p>You can download the source for this example from here:<br />
<a target="_blank" href="http://www.asido.info/examples/watermark/example_02.phps">http://www.asido.info/examples/watermark/example_02.phps</a></p>
]]></content:encoded>
			<wfw:commentRss>http://asido.info/howto/watermark/tile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Watermark Gravity</title>
		<link>http://asido.info/howto/watermark/gravity/</link>
		<comments>http://asido.info/howto/watermark/gravity/#comments</comments>
		<pubDate>Sat, 21 Apr 2007 18:52:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Watermark]]></category>

		<guid isPermaLink="false">http://shadow/wordpress-2.1.3/wordpress/?p=13</guid>
		<description><![CDATA[This example demonstrates how to use the watermark gravity.]]></description>
			<content:encoded><![CDATA[<p>This example demonstrates how to use the <a href="http://www.asido.info/about/features/#watermark">watermark</a> gravity. There are nine locations at which you can put the watermark (except when using the tile watermark), and this example puts a watermark on every one of these locations.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Include the main Asido class
*/</span>
<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./../../class.asido.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Set the correct driver: this depends on your local environment
*/</span>
asido<span style="color: #339933;">::</span><span style="color: #004000;">driver</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'gd'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Create an Asido_Image object and provide the name of the source
* image, and the name with which you want to save the file
*/</span>
<span style="color: #000088;">$i1</span> <span style="color: #339933;">=</span> asido<span style="color: #339933;">::</span><span style="color: #004000;">image</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'example.jpg'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'result_01.jpg'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Put a watermark image on every possible gravity location
*/</span>
<span style="color: #000088;">$watermark</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'watermark_01.png'</span><span style="color: #339933;">;</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$watermark</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_TOP_LEFT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$watermark</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_TOP_CENTER<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$watermark</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_TOP_RIGHT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$watermark</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_MIDDLE_LEFT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$watermark</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_MIDDLE_CENTER<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$watermark</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_MIDDLE_RIGHT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$watermark</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_BOTTOM_LEFT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$watermark</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_BOTTOM_CENTER<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Asido<span style="color: #339933;">::</span><span style="color: #004000;">watermark</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$watermark</span><span style="color: #339933;">,</span> ASIDO_WATERMARK_BOTTOM_RIGHT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Save the result
*/</span>
<span style="color: #000088;">$i1</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span>ASIDO_OVERWRITE_ENABLED<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Here you can see the source image, the watermark image, and the result:</p>
<div class="preview">
<a target="_blank" href="http://www.asido.info/examples/watermark/example.jpg" rel="lightbox[roadtrip]" title="Source Image">&nbsp;<img src="http://www.asido.info/examples/watermark/example_thumb.jpg" alt="Source Image" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/watermark_01.png" rel="lightbox[roadtrip]" title="Watermark">&nbsp;<img src="http://www.asido.info/examples/watermark/watermark_01.png" alt="Watermark" /></a> <a target="_blank" href="http://www.asido.info/examples/watermark/expected_result_01.jpg" rel="lightbox[roadtrip]" title="Result">&nbsp;<img src="http://www.asido.info/examples/watermark/expected_result_01_thumb.jpg" alt="Result" /></a>
</div>
<div style="clear:left;"></div>
<p>You can download the source for this example from here:<br />
<a target="_blank" href="http://www.asido.info/examples/watermark/example_01.phps">http://www.asido.info/examples/watermark/example_01.phps</a></p>
]]></content:encoded>
			<wfw:commentRss>http://asido.info/howto/watermark/gravity/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
