<?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:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Programming Ideas, Logics, Tips and Tricks &#187; implementation</title>
	<atom:link href="http://www.sajithmr.me/tag/implementation/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sajithmr.me</link>
	<description></description>
	<lastBuildDate>Sat, 07 Apr 2012 16:30:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Online Photoshop in PHP (Series Part 3)</title>
		<link>http://www.sajithmr.me/online-photoshop-in-php-series-part-3</link>
		<comments>http://www.sajithmr.me/online-photoshop-in-php-series-part-3#comments</comments>
		<pubDate>Mon, 26 May 2008 15:30:47 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[resize]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/online-photoshop-in-php-series-part-3/</guid>
		<description><![CDATA[Resize a Photo &#62;&#62; Today we will implement hows to resize photo into a particular width and height (or keeping aspect ratio) See the live example from: http://www.sajithmr.com/photoshop-tuts/resize/resize.php You need to install php-gd library to do this. To functions, imagecreatetruecolor and imagecopyresampled will do the resizing. Those who have not seen the Online Photo Editing [...]]]></description>
			<content:encoded><![CDATA[<h2>Resize a Photo &gt;&gt;</h2>
<p>Today we will implement hows to resize photo into a particular width and height (or keeping aspect ratio)</p>
<p>See the live example from: <a href="http://www.sajithmr.com/photoshop-tuts/resize/resize.php" target="_blank">http://www.sajithmr.com/photoshop-tuts/resize/resize.php</a></p>
<p>You need to install php-gd library to do this. To functions, <strong>imagecreatetruecolor</strong> and <strong>imagecopyresampled </strong>will do the resizing.</p>
<p>Those who have not seen the Online Photo Editing tool yet, have a look at: <a href="http://www.sajithmr.com/photoshop/index.php" title="Online Photo Editing Tool" target="_blank">http://www.sajithmr.com/photoshop/index.php </a></p>
<p>Here is the function:</p><pre class="crayon-plain-tag"><code>function Resize($image,$new_width,$new_height=0)
{

 $old_width = imagesx($image);
 $old_height= imagesy($image);

 if($new_height==0) // if the height is not specified
                           //....calculate the relative height
 $new_height= $new_width * $old_height / $old_width ;

 $new_image= imagecreatetruecolor($new_width, $new_height);
 imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width,
 $new_height, $old_width, $old_height);
 return $new_image;

}</code></pre><p>
Here the $image is the object of the image which is created from the function<strong> imagecreatefromgif</strong>($path_to_photo), if the image is in GIF format.</p>
<p>Other functions are <strong>imagecreatefromjpeg</strong> and <strong>imagecreatefrompng</strong> for JPEG and PNG respectively .</p>
<p>Download Full source code for this example from: <a href="http://www.sajithmr.com/photoshop-tuts/resize.zip">http://www.sajithmr.com/photoshop-tuts/resize.zip</a></p>
<p>In the previous part we implemented browse photos area. <a href="http://www.sajithmr.com/online-photoshop-in-php-series-part-2/" target="_blank">http://www.sajithmr.com/online-photoshop-in-php-series-part-2/</a></p>
<p>In that for browsing picture files, we used full size image, instead of thumbnails. Here new example , in which browse photos is implemented with image thumbnails using resizing (150 px)</p>
<p>The difference is , instead of calling img tag&#8217;s src to the orginal image path,  called through resize.php?img=path_to_image ,  passed the image path as parameter to resize function.</p>
<p>See live example: <a href="http://www.sajithmr.com/photoshop-tuts/browse-resize/browse.php" target="_blank">http://www.sajithmr.com/photoshop-tuts/browse-resize/browse.php</a></p>
<p>Take the html and see the difference from old browse implementation: <a href="http://www.sajithmr.com/photoshop-tuts/browse.php" target="_blank">http://www.sajithmr.com/photoshop-tuts/browse.php </a></p>
<p>Which is fast ??</p>
<p>Download the full source code for browsing with image thumbnail  from: <a href="http://www.sajithmr.com/photoshop-tuts/browse-resize.zip" target="_blank">http://www.sajithmr.com/photoshop-tuts/browse-resize.zip</a></p>
<p>Keep reading for the coming series,  part 4 , <strong>Orkut Like Photo Cropping &gt;&gt;</strong></p>
<p>Subscribe to this website feed now:<br />
<a href="http://feeds.feedburner.com/sajithmr"><img src="http://www.sajithmr.com/downloads/rss2.png" height="100" width="100" /></a></p>
<p>Regards</p>
<p>Sajith M.R</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/online-photoshop-in-php-series-part-3/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<series:name><![CDATA[Online Photoshop]]></series:name>
	</item>
		<item>
		<title>Gmail Chat Implementation</title>
		<link>http://www.sajithmr.me/gmail-chat-implementation</link>
		<comments>http://www.sajithmr.me/gmail-chat-implementation#comments</comments>
		<pubDate>Wed, 07 May 2008 10:30:34 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[gtalk]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[notification]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/gmail-chat-implementation/</guid>
		<description><![CDATA[Today i implemented gmail chat window , not an ajax chat with a chat server, but its client side implementation. Here you can see the demo: http://www.sajithmr.com/gtalk/ Take this link in a new tab or window, and take any other website without closing it. After 3 seconds , (Consider it as a new chat message [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/05/screenshot.jpg" /></p>
<p>Today i implemented gmail chat window , not an ajax chat with a chat server, but its client side implementation.</p>
<p>Here you can see the demo: <font size="4"> <a href="http://www.sajithmr.com/gtalk/" title="Gmail Chat Implementation" target="_blank">http://www.sajithmr.com/gtalk/</a></font></p>
<p>Take this link in a new tab or window, and take any other website without closing it.</p>
<p>After 3 seconds , (Consider it as a new chat message arrived situation) you can see the google chat notification sound , and title changing. (I didn&#8217;t get the actual gtalk notification sound, so i used windows notify.wav file )</p>
<p>You know google (gmail) implemented its sound notification is  via swf object. Here  me too done the same.</p>
<p>I wrote two function to check whether the browser is in focus or not.</p><pre class="crayon-plain-tag"><code></code></pre><p>Here is the functions:</p><pre class="crayon-plain-tag"><code>function lostFocus()
{
document.title = 'Sajith M.R Says...';
state = 'nonfocus';

played =  0 ;

changeColorRed();

alterTitle();

}

function gotFocus()
{
document.title = 'Gmail Inbox(1)';

state = 'focus';

played = 0 ;
}</code></pre><p><p>
The    alterTitle() function calls in 3 seconds setTimeOut manner.</p><pre class="crayon-plain-tag"><code>function alterTitle()
{

if(state =='nonfocus')

{
if ( document.title == 'Gmail Inbox(1)')
{

if(played == 0)
{
soundManager.play('notify');
played = 1;
}

document.title = 'Sajith M.R Says...';

}
else
document.title = 'Gmail Inbox(1)';

setTimeout(&quot;alterTitle()&quot;,3000);

}
}</code></pre><p><p><p>
The soundmanager.js file handles the swf flash object and sound triggering.</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;script/soundmanager.js&#8221;&gt;&lt;/script&gt;</p>
<p>These three simple scripts together created this demo:<font size="4"> <a href="http://www.sajithmr.com/gtalk/" title="Gmail Chat Implementation" target="_blank">http://www.sajithmr.com/gtalk/</a></font></p>
<p>If you want the whole source code , mail me: <a href="mailto://admin@sajithmr.com">admin@sajithmr.com </a></p>
<p>Comment Please &#8230;</p>
<p>Regards</p>
<p>Sajith.M.R<br />
<a href="http://www.sajith.name/" title="Sajith">http://www.sajith.name </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/gmail-chat-implementation/feed</wfw:commentRss>
		<slash:comments>36</slash:comments>
	
		<series:name><![CDATA[Gmail Architecture]]></series:name>
	</item>
	</channel>
</rss>

