<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

<channel>
	<title>The Matt Gifford Show</title>
	<atom:link href="http://www.mattgifford.co.uk/feed/podcast/" rel="self" type="application/rss+xml" />
	<link>http://www.mattgifford.co.uk</link>
	<description>The random notes from a random no-one</description>
	<lastBuildDate>Thu, 18 Mar 2010 17:02:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<itunes:subtitle>The random notes from a random no-one</itunes:subtitle>
	<itunes:author>Matt Gifford</itunes:author>
	<itunes:category text="Music" />
	<itunes:category text="Comedy" />
	<itunes:explicit>no</itunes:explicit>
	<itunes:owner>
		<itunes:name>Matt Gifford</itunes:name>
		<itunes:email>mattgiffordshow@gmail.com</itunes:email>
	</itunes:owner>
			<item>
		<title>Image Cropping with ColdFusion &amp; jQuery</title>
		<link>http://www.mattgifford.co.uk/image-cropping-with-coldfusion-jquery/</link>
		<comments>http://www.mattgifford.co.uk/image-cropping-with-coldfusion-jquery/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 12:49:14 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.mattgifford.co.uk/?p=894</guid>
		<description><![CDATA[ColdFusion 8 was an amazing release. The addition of the many image-related functions and cfImage tags certainly enhanced an already fantastic server-side language. They are fun to use, fun to write, and incredibly simple.
I wanted to have a quick play around with some front-end code to create a user-interface to dynamically crop an image using [...]]]></description>
		<wfw:commentRss>http://www.mattgifford.co.uk/image-cropping-with-coldfusion-jquery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://www.mattgifford.co.uk/downloads/jcropColdFusion_demo.zip" length="a:5:{s:6:"format";s:14:"default-format";s:8:"keywords";s:0:"";s:6:"author";s:0:"";s:6:"length";s:0:"";s:8:"explicit";s:0:"";}" type="a:5:{s:6:"format";s:14:"default-format";s:8:"keywords";s:0:"";s:6:"author";s:0:"";s:6:"length";s:0:"";s:8:"explicit";s:0:"";}" />
	<itunes:summary>ColdFusion 8 was an amazing release. The addition of the many image-related functions and cfImage tags certainly enhanced an already fantastic server-side language. They are fun to use, fun to write, and incredibly simple.
I wanted to have a quick play around with some front-end code to create a user-interface to dynamically crop an image using ColdFusion. Todd Sharp, Mr. Slidesix.com himself, developed a fantastic ColdFusion custom tag called cfImageCropper a few years ago to handle image cropping within CF. Ive used this custom tag a few times in the past on various projects. If you havent seen it or given it a test run, make sure you do.
Instead of creating a custom tag, my small demonstration example uses jQuery and in particular a supersweet plugin called Jcrop to handle the core of the user-experince code and creating the crop marker. Heres a short video of the code in action (it will open in a new window):

The HTML
The HTML for the page and demonstration is fairly simple. The page contains a form which holds the required image-related values (X and Y positions, width and height, and the original image file name) which will be sent to the crop.cfm page to perform the image manipulation.
A thumbnail menu on the right hand side of the page contains the images available to load into the main view, from which you can perform the cropping.

&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;coldfumonkeh : Jcrop and ColdFusion - image cropping&lt;/title&gt;
	&lt;script src="js/jquery.min.js"&gt;&lt;/script&gt;
	&lt;script src="js/jquery.Jcrop.js"&gt;&lt;/script&gt;
	&lt;link rel="stylesheet" href="css/jquery.Jcrop.css" type="text/css" /&gt;
	&lt;link rel="stylesheet" href="css/style.css" type="text/css" /&gt;

	&lt;!-- our script will go here --&gt;
    &lt;script language="Javascript"&gt;

    &lt;/script&gt;	

&lt;/head&gt;
&lt;body&gt;
	&lt;div id="outer"&gt;
	&lt;div class="imageContainer"&gt;
	&lt;h2&gt;jCrop and ColdFusion&lt;/h2&gt;
		&lt;!-- The event handler from the JCrop plugin populates these
			values for us. Required to obtain the X Y coords and persist
			the image location for cropping and reverting the image. --&gt;
		&lt;form action="crop.cfm" method="post"&gt;
			&lt;input type="hidden" size="4" id="x" name="x" /&gt;
			&lt;input type="hidden" size="4" id="y" name="y" /&gt;
			&lt;input type="hidden" size="4" id="x2" name="x2" /&gt;
			&lt;input type="hidden" size="4" id="y2" name="y2" /&gt;
			&lt;input type="hidden" size="4" id="w" name="w" /&gt;
			&lt;input type="hidden" size="4" id="h" name="h" /&gt;

			&lt;input type="hidden" name="imageFile"
					id="imageFile" value="" /&gt;
			&lt;input type="button" name="imageCrop_btn"
					id="imageCrop_btn" value="Crop the image" /&gt;
			&lt;input type="button" name="revert_btn"
					id="revert_btn" value="Revert to original" /&gt;
		&lt;/form&gt;
		&lt;!-- This is the image we're attaching Jcrop to --&gt;
		&lt;div id="croppedImage"&gt;
            &lt;img src="images/ZamakRobots1.jpg" id="cropbox" /&gt;
        &lt;/div&gt;
		&lt;div id="thumbs"&gt;
			&lt;ul class="thumb"&gt;

				&lt;li&gt;&lt;a href="images/ZamakRobots1.jpg"&gt;
				&lt;img src="images/thumbs/ZamakRobots1.jpg" alt="Image 1" /&gt;
				&lt;/a&gt;&lt;/li&gt;

				&lt;li&gt;&lt;a href="images/ZamakRobots2.jpg"&gt;
				&lt;img src="images/thumbs/ZamakRobots2.jpg" alt="Image 2" /&gt;
				&lt;/a&gt;&lt;/li&gt;

				&lt;li&gt;&lt;a href="images/ZamakRobots3.jpg"&gt;
				&lt;img src="images/thumbs/ZamakRobots3.jpg" alt="Image 3" /&gt;
				&lt;/a&gt;&lt;/li&gt;

			&lt;/ul&gt;
		&lt;/div&gt;
		&lt;p&gt;This demonstration uses the awesome
		&lt;a href="http://deepliquid.com/content/Jcrop.html" title="Jcrop jQuery plugin"
			target="_blank"&gt;Jcrop jQuery plugin&lt;/a&gt; from Deep Liquid.&lt;/p&gt;
		&lt;p&gt;Robots designed by &lt;a href="http://www.zamak.fr/"
			title="Oliver Bucheron at zamak.fr" target="_blank"&gt;
			Olivier Bucheron&lt;/a&gt;.&lt;/p&gt;
        [...]</itunes:summary>
<itunes:subtitle>ColdFusion 8 was an amazing release. The addition of the many image-related functions and cfImage tags certainly enhanced an already fantastic server-side language. They are fun to use, fun to write, and incredibly simple.
I wanted to have a quick [...]</itunes:subtitle>
	</item>
		<item>
		<title>The Matt Gifford Show Returns #1</title>
		<link>http://www.mattgifford.co.uk/the-matt-gifford-show-returns-1/</link>
		<comments>http://www.mattgifford.co.uk/the-matt-gifford-show-returns-1/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 16:58:24 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[MGS Podcast]]></category>

		<guid isPermaLink="false">http://www.mattgifford.co.uk/blog/?p=24</guid>
		<description><![CDATA[It&#8217;s coming back.. here&#8217;s promo #1.
Direct link to show


]]></description>
		<wfw:commentRss>http://www.mattgifford.co.uk/the-matt-gifford-show-returns-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.mattgifford.co.uk/blog/wp-content/uploads/2008/08/the-matt-gifford-show-return-intro-1-29082008.mp3" length="970345" type="audio/mpeg" />
	<itunes:summary>Its coming back.. heres promo #1.
Direct link to show</itunes:summary>
<itunes:subtitle>Its coming back.. heres promo #1.
Direct link to show</itunes:subtitle>
<itunes:author>The Matt Gifford Show</itunes:author>
<itunes:duration>00:01:00</itunes:duration>
<itunes:keywords>The Matt Gifford Show, comedy, music, bands, honey badger</itunes:keywords>
<itunes:explicit>no</itunes:explicit>
	</item>
		<item>
		<title>Song of the week&#8230;</title>
		<link>http://www.mattgifford.co.uk/song-of-the-week/</link>
		<comments>http://www.mattgifford.co.uk/song-of-the-week/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 15:12:52 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.mattgifford.co.uk/blog/?p=20</guid>
		<description><![CDATA[I heard this song on Adam Curry&#8217;s Daily Source Code podcast a few weeks ago and loved it. I had to track it down and share it with the world.
&#8220;Awakening&#8221; by Switchfoot

Direct link to the mp3



]]></description>
		<wfw:commentRss>http://www.mattgifford.co.uk/song-of-the-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.mattgifford.co.uk/blog/wp-content/uploads/2008/08/04awakening.mp3" length="5421676" type="audio/mpeg" />
	<itunes:summary>I heard this song on Adam Currys Daily Source Code podcast a few weeks ago and loved it. I had to track it down and share it with the world.
Awakening by Switchfoot

Direct link to the mp3</itunes:summary>
<itunes:subtitle>I heard this song on Adam Currys Daily Source Code podcast a few weeks ago and loved it. I had to track it down and share it with the world.
Awakening by Switchfoot

Direct link to the mp3</itunes:subtitle>
	</item>
	</channel>
</rss>
