<?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>riscit.info &#187; tutorials</title>
	<atom:link href="http://www.riscit.info/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.riscit.info</link>
	<description>too young to retire, too rich to work</description>
	<lastBuildDate>Tue, 17 Jan 2012 20:16:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Remove Background in Photoshop</title>
		<link>http://www.riscit.info/2009/09/remove-background-in-photoshop/</link>
		<comments>http://www.riscit.info/2009/09/remove-background-in-photoshop/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 14:01:08 +0000</pubDate>
		<dc:creator>riscphree</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.riscit.info/?p=115</guid>
		<description><![CDATA[I&#8217;m no graphics designer and I don&#8217;t know much of Photoshop, but lately I&#8217;ve been feeling really creative and really want to learn more of Photoshop. This short tutorial shows you how to take the background out of a photo. Something that comes in very handy. WARNING: I&#8217;m going to use a picture of me [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m no graphics designer and I don&#8217;t know much of Photoshop, but lately I&#8217;ve been feeling really creative and really want to learn more of Photoshop.</p>
<p>This short tutorial shows you how to take the background out of a photo. Something that comes in very handy.</p>
<p><strong>WARNING:</strong> I&#8217;m going to use a picture of me for an example. It is very lolsy and may distract you.</p>
<p><span id="more-115"></span>1. Open your image in Photoshop. I am using CS2, so the exact steps might not be the same, but they should be very close to whatever version of Photoshop you&#8217;re using.</p>
<p>Once you have the image in Photoshop, double click the <em><strong>background</strong></em> layer in your layers. This turns it into a layer.</p>
<p>2. We use the Extract feature for this in Photoshop. It should be under the <strong>Filter-&gt;Extract</strong> menu (<strong>ALT+CTRL+X</strong>). If it isn&#8217;t check the help for your version of Photoshop.</p>
<p><a href="http://www.riscit.info/wp-content/uploads/2009/09/extract.PNG" rel="lightbox[115]"><img class="aligncenter size-medium wp-image-116" title="Filter-&gt;Extract" src="http://www.riscit.info/wp-content/uploads/2009/09/extract-300x261.PNG" alt="Filter-&gt;Extract" width="300" height="261" /></a></p>
<p>3. Use the <strong>marker tool </strong>to trace around the image, keeping half of it on the image and half of it on the background.</p>
<p><a href="http://www.riscit.info/wp-content/uploads/2009/09/marker.PNG" rel="lightbox[115]"><img class="aligncenter size-medium wp-image-117" title="marker tool" src="http://www.riscit.info/wp-content/uploads/2009/09/marker-300x225.PNG" alt="marker tool" width="300" height="225" /></a></p>
<p>4. Once you have traced around the image, use the <strong>bucket tool</strong> to fill the area you want to keep.</p>
<p><a href="http://www.riscit.info/wp-content/uploads/2009/09/bucket.PNG" rel="lightbox[115]"><img class="aligncenter size-medium wp-image-118" title="bucket tool" src="http://www.riscit.info/wp-content/uploads/2009/09/bucket-300x225.PNG" alt="bucket tool" width="300" height="225" /></a></p>
<p>5. You can click <strong>ok</strong> to process the image. The background is now removed.</p>
<p><a href="http://www.riscit.info/wp-content/uploads/2009/09/finished.PNG" rel="lightbox[115]"><img class="aligncenter size-medium wp-image-119" title="finished" src="http://www.riscit.info/wp-content/uploads/2009/09/finished-300x224.PNG" alt="finished" width="300" height="224" /></a></p>
<p>6. The image might not look too great around the edges, however, you can easily fix this up. To do this, we&#8217;re going to use the <strong>History brush</strong>. Click the box next to the step you did just before the extract.</p>
<p><a href="http://www.riscit.info/wp-content/uploads/2009/09/history.PNG" rel="lightbox[115]"><img class="aligncenter size-full wp-image-120" title="history" src="http://www.riscit.info/wp-content/uploads/2009/09/history.PNG" alt="history" width="217" height="134" /></a></p>
<p>7. Select the History brush and go around your image and fix up where it needs it. Use the eraser in conjunction with the brush to make it look good.</p>
<p><a href="http://www.riscit.info/wp-content/uploads/2009/09/finished2.PNG" rel="lightbox[115]"><img class="aligncenter size-medium wp-image-121" title="All done" src="http://www.riscit.info/wp-content/uploads/2009/09/finished2-300x225.PNG" alt="All done" width="300" height="225" /></a></p>
<p>All done! This is very easy to do in Photoshop and your technique will only improve in both speed and quality the more you do it. Go have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.riscit.info/2009/09/remove-background-in-photoshop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>htaccess redirects</title>
		<link>http://www.riscit.info/2009/08/htaccess-redirects/</link>
		<comments>http://www.riscit.info/2009/08/htaccess-redirects/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 22:49:49 +0000</pubDate>
		<dc:creator>riscphree</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.riscit.info/?p=63</guid>
		<description><![CDATA[I recently had someone ask me if they could set the priority of some pages. In this specific case they wanted index.php to take precedence over index.html. Well, on shared hosting you can&#8217;t change the server config to do this (which by the way is in the httpd.conf for Apache). So the next best thing [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had someone ask me if they could set the priority of some pages. In this specific case they wanted index.php to take precedence over index.html. Well, on shared hosting you can&#8217;t change the server config to do this (which by the way is in the httpd.conf for Apache). So the next best thing to do is .htaccess redirects.</p>
<p>htaccess will only work on Apache webservers, if in doubt consult your webhost. To use these, you will need to create a text file and call it htaccess. Input code from below into it to suit your needs, and upload to your site via ftp. You will then need to rename the file to .htaccess</p>
<p>There are a couple  different codes that are returned to the browser on redirects.</p>
<p>301 &#8211; Permanent Redirect. Good for moving files forever. This tells the search engine and clients that it has moved permanently and should use the new URI.</p>
<p>302 &#8211; Temporary Redirect. It tells the search engine and client that it&#8217;s redirecting and should continue to use the requested URI.</p>
<p>Here are some sample redirect usages:</p>
<p>301 Moving a single page</p>
<pre>Redirect 301 /oldpage.html http://www.example.com/newpage.html</pre>
<p>301 Move entire site</p>
<pre>Redirect 301 / http://www.example.com/</pre>
<p>To do 302 redirects, just replace 301 with 302.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.riscit.info/2009/08/htaccess-redirects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>how to make hdr photographs</title>
		<link>http://www.riscit.info/2009/08/how-to-make-hdr-photographs/</link>
		<comments>http://www.riscit.info/2009/08/how-to-make-hdr-photographs/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 18:21:41 +0000</pubDate>
		<dc:creator>riscphree</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.riscit.info/?p=29</guid>
		<description><![CDATA[First off, I&#8217;m no photographer. I own a cheap-ish point and shoot digital camera. But I also want to make some cool looking photos, or at least try. HDR (High Dynamic Range) is a set of techniques that allows a greater dynamic range of luminances between light and dark areas of a scene than normal [...]]]></description>
			<content:encoded><![CDATA[<p>First off, I&#8217;m no photographer. I own a cheap-ish point and shoot digital camera. But I also want to make some cool looking photos, or at least try.</p>
<p><a href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">HDR</a> (High Dynamic Range) is a set of techniques that allows a greater dynamic range of luminances between light and dark areas of a scene than normal digital imaging techniques. It makes really cool looking photos.</p>
<p>Here&#8217;s how I did it using <a href="http://www.hdrsoft.com/">HDRsoft&#8217;s</a> Photomatix.</p>
<p><span id="more-29"></span></p>
<p>Take three pictures using a tripod. I took one picture at EV (exposure value) +2, one at EV 0, and a third at EV -2. If you don&#8217;t know how to change your EV, look for the +/- symbol.  Here is an example picture of the <a href="http://www.auinteractive.com/media/hdr/exposure.jpg" rel="lightbox[29]">EV button</a>.</p>
<p>Once you have your three pictures, open up Photomatix. Click <strong>Generate HDR</strong>. Click <strong>Browse</strong> and select the three photos you just took.</p>
<p>Use these options:</p>
<p><img class="aligncenter" title="HDR options" src="http://planaheist.com/imagehost/images/photomatix.png" alt="" width="430" height="384" />If you have moving water in your shot, change the option to <strong>Background movements</strong> otherwise leave <strong>Moving objects/people</strong> selected.</p>
<p>Click <strong>OK</strong>, wait for it to generate the HDR image. It will normally be too dark, now click <strong>Tone Mapping</strong>. Then play with the settings to get whatever effect you want.</p>
<p><img class="aligncenter" title="HDR Settings" src="http://planaheist.com/imagehost/images/photomnqn.png" alt="" width="249" height="208" />Once you have found the effects and like what you have done, click <strong>Process</strong>. Then <strong>File</strong> -&gt;<strong> Save As</strong> to save as a JPG. All done!</p>
<p>Here is a photo I did with my cheap point and shoot:<br />
<a href="http://planaheist.com/imagehost/?v=kawesome.jpg" rel="lightbox[29]"><img src="http://planaheist.com/imagehost/thumbs/kawesome.jpg" border="0" alt="" /></a></p>
<p>Images from http://abduzeedo.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.riscit.info/2009/08/how-to-make-hdr-photographs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>write on images with php</title>
		<link>http://www.riscit.info/2009/03/write-on-images-with-php/</link>
		<comments>http://www.riscit.info/2009/03/write-on-images-with-php/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 17:17:01 +0000</pubDate>
		<dc:creator>riscphree</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.riscit.info/blog/?p=14</guid>
		<description><![CDATA[I recently had a client that wanted to generate those dynamic images with text on them. I know you’ve seen them all over. The ones with the nude chicks holding signs saying “Alberto wuz here” or whatever. Truth is, these fan signs are really easy to make.

For this example]]></description>
			<content:encoded><![CDATA[<p>I recently had a client that wanted to generate those dynamic images with text on them. I know you&#8217;ve seen them all over. The ones with the nude chicks holding signs saying &#8220;Alberto wuz here&#8221; or whatever. Truth is, these fan signs are really easy to make.</p>
<p>For this example I&#8217;m gonna use this image:</p>
<p><a title="sign.jpg" href="../../dynamic_image/sign.jpg" rel="lightbox[14]"><img src="../../dynamic_image/sign.jpg" border="0" alt="sign.jpg" /></a></p>
<p>In order to write on images, you&#8217;re gonna need the GD library installed in your server. Most of the time this is already done if you&#8217;re using shared hosting or if you&#8217;ve already got a working webserver.</p>
<p>Save and upload that image into a dir on your server, and we&#8217;ll begin working.</p>
<p>We want to be able to input any string of text so we&#8217;re going to make a form for submission. Create a form using:</p>
<pre class="html4strict">
<pre class="chili"><code class="html""""">&lt;form action=&quot;img.php&quot; method=&quot;get&quot;&gt;
&lt;input type=&quot;text&quot; name=&quot;line1&quot; /&gt;
&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Do it!&quot; /&gt;
&lt;/form&gt;</code></pre>
</pre>
<p>As you can see, it&#8217;s not fancy, but it works.</p>
<p>Lets start off with the &#8220;Hello World&#8221; example. Save this as img.php</p>
<pre class="php">
<pre class="chili"><code class="php""""""">&lt;?php
$string = $_GET[&#039;line1&#039;]; // lets get the text from the form
// define what image we want to write on
$im = imagecreatefromjpeg(&quot;sign.jpg&quot;);
// define the text color, red, green, blue
$textcolor = imagecolorallocate($im, 61, 61, 61);
$font = imageloadfont(&#039;Brigitte.gdf&#039;); // tells it what font to use
imagestring($im, $font, 175, 395, $string, $textcolor); // line o&#039;text
// header to tell the browser it&#039;s an image
header(&quot;Content-type: image/jpeg&quot;);
imagejpeg($im); // creates the image with text
imagedestroy($im); // destroys the image in the memory
?&gt;</code></pre>
</pre>
<p>Let&#8217;s take a look at whats going on here. From the comments you can tell whats going on for the most part, but I can expand.</p>
<p>Line 1 of the code is using the GET method from the form we created to store the text in a variable called $string.</p>
<p><a href="http://php.net/imagecreatefromjpeg">imagecreatefromjpeg()</a> PHP function tells PHP that we want to use a JPEG image. PHP has functions for GIF, PNG and strings, BMP, XBM, XPM, and from GD itself.</p>
<p>We then allocate the colors we want to use for the text. <a href="http://php.net/imagecolorallocate">imagecolorallocate()</a> uses RGB values to do this.</p>
<p><a href="http://php.net/imageloadfont">imageloadfont()</a> loads our font for writing. It can be a bit tricky to find a font suitable for writing on images and I&#8217;ve included a few in the download at the end of this article with the rest of the code. There is, however, a great program that allows you to take any Windows font and turn it into a GD font. You can get this program from here: <a href="http://www.wedwick.com/wftopf.exe">http://www.wedwick.com/wftopf.exe</a></p>
<p>The fifth line of code is where PHP does the writing. It takes the image, font, X and Y coordinates, the string (your text), and finally the text color and writes on the image.</p>
<p>The <a href="http://php.net/header">header()</a> is basic PHP to tell the browser what kind of content it is viewing, in this case an image.</p>
<p>PHP then creates the image, and destroys the temp image in memory. You should now have something like this:</p>
<p><img src="../../dynamic_image/helloworld.jpg" border="0" alt="" /></p>
<p>Afterthoughts: You can create a form that does POST instead of GET for a bit more &#8220;security&#8221; through obsecurity.</p>
<p>You could use one page for all the code, but I used two to help newbies.</p>
<p>Download archive with project files here: <a href="../../dynamic_image/php-gd.rar">php-gd.rar</a></p>
<p>Here is the script in action: <a href="../../dynamic_image/input.html">http://riscit.info/dynamic_image/input.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.riscit.info/2009/03/write-on-images-with-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>stream audio continously</title>
		<link>http://www.riscit.info/2009/03/stream-audio-continously/</link>
		<comments>http://www.riscit.info/2009/03/stream-audio-continously/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 17:15:08 +0000</pubDate>
		<dc:creator>riscphree</dc:creator>
				<category><![CDATA[shoutcast]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.riscit.info/blog/?p=12</guid>
		<description><![CDATA[I recently installed shoutcast on one of my VPS accounts and wanted to stream music even when I don&#8217;t have the DNAS program (or any other dj program). What I did was download a couple podcast shows and wanted to play them. There is a program the shout cast guys developed called sc_trans. It transcodes [...]]]></description>
			<content:encoded><![CDATA[<p>I recently installed <a href="http://shoutcast.com/">shoutcast</a> on one of my VPS accounts and wanted to stream music even when I don&#8217;t have the DNAS program (or any other dj program).</p>
<p>What I did was download a couple podcast shows and wanted to play them. There is a program the shout cast guys developed called sc_trans. It transcodes files to the shoutcast server.</p>
<p>The download link on the shoutcast site doesn&#8217;t link to the right place so its a bit trivial. I&#8217;ve included the link at the end of this post.</p>
<p>You will need to generate a playlist of the files you want to play and can do that with:</p>
<pre># find /Mp3 -type f -name "*.mp3" &gt; /opt/shoutcast/playlists/playlist.lst</pre>
<p>Which will make a playlist from all the mp3s in the /Mp3 dir and save it in /opt/shoutcast/playlists/</p>
<p>There are quite a few options in the sc_trans.conf file you will want to look at.</p>
<p>sc_trans will only play the files with the same  sample rate. You&#8217;ll have to resample all your mp3s to the same rate <img class="wp-smiley" src="../wp-includes/images/smilies/icon_sad.gif" alt=":(" /></p>
<p>For example, in the sc_trans.conf if you specify</p>
<pre>SampleRate=32000</pre>
<p>It will only stream files with 32Khz sample rate. You can use the <a href="http://lame.sourceforge.net/">lame</a> program to re-encode your files by doing the following (this re-encodes into 44Khz):</p>
<pre>lame --resample 44.1 InputFile.mp3 OutPutfile.mp3</pre>
<p>If you want to re-sample an entire directory of mp3s, you can use a shell script:</p>
<pre>#!/bin/sh

for i in *.mp3; do
lame --resample 44.1 ${i}
done</pre>
<p>Save that as<strong> lame.sh</strong>, <strong>chmod + x lame</strong>.<strong>sh</strong> and then <strong>./lame.sh</strong></p>
<p>Here is a overview of some of the settings of sc_trans and shoutcast itself. It is an excellent guide.  <a href="http://www.gentoo.org/doc/en/shoutcast-config.xml">Streaming Radio with Shoutcast</a></p>
<p>Download sc_trans from Shoutcast.com <a href="http://www.shoutcast.com/downloads/sc_trans_posix_040.tgz">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.riscit.info/2009/03/stream-audio-continously/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

