<?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>andij.com &#187; sfImageTransform</title>
	<atom:link href="http://andij.com/tag/sfimagetransform/feed" rel="self" type="application/rss+xml" />
	<link>http://andij.com</link>
	<description>website design and delivery</description>
	<lastBuildDate>Sat, 31 Jul 2010 21:26:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>sfImageTransformPlugin &#8211; released</title>
		<link>http://andij.com/2008/10/15/sfimagetransformplugin-released</link>
		<comments>http://andij.com/2008/10/15/sfimagetransformplugin-released#comments</comments>
		<pubDate>Wed, 15 Oct 2008 19:34:46 +0000</pubDate>
		<dc:creator>andij</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Freelance]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[sfImageTransform]]></category>
		<category><![CDATA[sfImageTransformPlugin]]></category>
		<category><![CDATA[stumani]]></category>

		<guid isPermaLink="false">http://andij.com/?p=69</guid>
		<description><![CDATA[Stuart Lowes has released sfImageTransformPlugin 0.1.0 for Symfony. This plugin is for manipulating images using the GD or ImageMagick libraries. A simple to use and flexible image manipulation symfony plugin. The plugin allows you to perform &#8220;transforms&#8221; on an image. A transform maybe simple like a resizing or mirroring or more complex like overlays and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com/stunami">Stuart Lowes</a> has released <a href="http://www.symfony-project.org/plugins/sfImageTransformPlugin">sfImageTransformPlugin</a> 0.1.0 for Symfony.  This plugin is for manipulating images using the GD or ImageMagick libraries.</p>
<p>A simple to use and flexible image manipulation symfony plugin. The plugin allows you to perform &#8220;transforms&#8221; on an image. A transform maybe simple like a resizing or mirroring or more complex<span id="more-69"></span> like overlays and pixelizing. The transforms can be chained together or applied individually. New transforms can be simple created by extending the sfImageTranform abstract class.</p>
<h2>Download</h2>
<p><a href="http://plugins.symfony-project.org/sfImageTransformPlugin">http://plugins.symfony-project.org/sfImageTransformPlugin</a></p>
<h2>Plugin page</h2>
<p><a href="http://www.symfony-project.org/plugins/sfImageTransformPlugin">http://www.symfony-project.org/plugins/sfImageTransformPlugin</a></p>
<h2>Examples</h2>
<h4>Starting with the original image:-</h4>
<p><a href="http://andij.com/wp-content/uploads/2008/09/sfimagetransform_logo.png"><img class="size-full wp-image-53" title="sfimagetransform_logo" src="http://andij.com/wp-content/uploads/2008/09/sfimagetransform_logo.png" alt="sfImageTransform" width="218" height="327" /></a></p>
<h4>Here is an example of a transform that:-</h4>
<ul>
<li>scales &#8216;logo.png&#8217; by 50%</li>
</ul>
<pre class="brush: php;">
public function executeDemo1()
{
 $img = new sfImage(sfConfig::get('sf_upload_dir') . DIRECTORY_SEPARATOR . 'logo.png', 'image/png');
 $response = $this-&gt;getResponse();
 $response-&gt;setContentType($img-&gt;getMIMEType());

 $img-&gt;scale(0.5);

 $response-&gt;setContent($img);

 return sfView::NONE;
}
</pre>
<p>Result:-</p>
<p><a href="http://andij.com/wp-content/uploads/2008/10/demo1.png"><img class="alignnone size-medium wp-image-100" title="demo1" src="http://andij.com/wp-content/uploads/2008/10/demo1.png" alt="" /></a></p>
<h4>Here is an example of a transform that:-</h4>
<ul>
<li>flood fill&#8217;s &#8216;logo.png&#8217; at &#8216;x100,y170&#8242; with #000000</li>
<li>scales by 50%</li>
<li>rotate by 120%</li>
<li>draw a rectancle of 5 pixels around edge and colour it #00FF00</li>
<li>write the text &#8220;bathcamp 2008&#8243; at &#8216;x10,y10&#8242; 10px Verdana coloured #FF9900</li>
</ul>
<pre class="brush: php;">
public function executeDemo5()
{
 $img = new sfImage(sfConfig::get('sf_upload_dir') . DIRECTORY_SEPARATOR . 'logo.png', 'image/png');
 $response = $this-&gt;getResponse();
 $response-&gt;setContentType($img-&gt;getMIMEType());

 $img-&gt;fill(100,170)-&gt;scale(0.5)-&gt;rotate(120)-&gt;rectangle(1, 1, $img-&gt;getWidth() - 1, $img-&gt;getHeight() - 5, 5, '#00FF00')-&gt;text('bathcamp 2008', 10, 10, 10, 'Verdana', '#FF9900');

 $response-&gt;setContent($img);

 return sfView::NONE;
}
</pre>
<p>Result</p>
<p><a href="http://andij.com/wp-content/uploads/2008/10/demo5.png"><img class="alignnone size-full wp-image-103" title="demo5" src="http://andij.com/wp-content/uploads/2008/10/demo5.png" alt="" /></a><br />
<a href="http://twitter.com/stunami">Stunami</a> has provided a collection of transforms for the GD and ImageMagick libraries.</p>
]]></content:encoded>
			<wfw:commentRss>http://andij.com/2008/10/15/sfimagetransformplugin-released/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
