<?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>AnthonyKinson.co.uk &#187; Bouncy Xbox Live</title>
	<atom:link href="http://anthonykinson.co.uk/tag/bouncy-xbox-live/feed" rel="self" type="application/rss+xml" />
	<link>http://anthonykinson.co.uk</link>
	<description>Welcome To My World</description>
	<lastBuildDate>Thu, 14 Jan 2010 17:58:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Plans For 2010!</title>
		<link>http://anthonykinson.co.uk/programing-internet/220_plans-for-2010</link>
		<comments>http://anthonykinson.co.uk/programing-internet/220_plans-for-2010#comments</comments>
		<pubDate>Fri, 08 Jan 2010 11:26:52 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Programing & Internet]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Bouncy Radio Center]]></category>
		<category><![CDATA[Bouncy Xbox Live]]></category>
		<category><![CDATA[BouncyServers]]></category>
		<category><![CDATA[IP.Mail]]></category>

		<guid isPermaLink="false">http://anthonykinson.co.uk/programing-internet/220_plans-for-2010</guid>
		<description><![CDATA[With 2009 over, its time to focus on the plans for this year, in regards to my work, there&#8217;s a lot of stuff to come. Firstly, the massive IP.Mail application, which so far is proving to work amazingly well and has had a lot of support. I’m hoping to have the first public Beta version [...]]]></description>
			<content:encoded><![CDATA[<p>With 2009 over, its time to focus on the plans for this year, in regards to my work, there&#8217;s a lot of stuff to come. Firstly, the massive IP.Mail application, which so far is proving to work amazingly well and has had a lot of support. I’m hoping to have the first public Beta version of IP.Mail released by the end of January.</p>
<p>Bouncy Radio Center will also see a new version coming out, and more importantly, a new module which will allow for people with dedicated servers to run and manage their own SHOUTcast server right from within the radio center itself.</p>
<p>Bouncy XBox LIVE will also have some cool updates, this time for the Forum Achievements which people have been awaiting for a while.</p>
<p>&#160;</p>
<p>For BouncyServers, we shall be soon doing an updated on our licensing software in order to have everything managed from 1 client area instead of the 2 client areas we currently have (for hosting services and licensing) this should make everything much easier for everybody.</p>
<p>More updates will be coming soon, so check back!</p>
<p>Anthony</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonykinson.co.uk/programing-internet/220_plans-for-2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Radio Center, XBox LIVE &amp; License Control Updates</title>
		<link>http://anthonykinson.co.uk/programing-internet/217_radio-center-xbox-live-license-control-updates</link>
		<comments>http://anthonykinson.co.uk/programing-internet/217_radio-center-xbox-live-license-control-updates#comments</comments>
		<pubDate>Tue, 13 Oct 2009 17:58:18 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Programing & Internet]]></category>
		<category><![CDATA[Apps]]></category>
		<category><![CDATA[Bouncy License Control]]></category>
		<category><![CDATA[Bouncy Radio Center]]></category>
		<category><![CDATA[Bouncy Xbox Live]]></category>
		<category><![CDATA[BouncyServers]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[v1.0]]></category>
		<category><![CDATA[v2.1]]></category>
		<category><![CDATA[v9.1]]></category>

		<guid isPermaLink="false">http://anthonykinson.co.uk/programing-internet/radio-center-xbox-live-license-control-updates/</guid>
		<description><![CDATA[ 
Its been a while since i have posted on my blog, I’ve been crazy busy with lots of updates and new Apps. First of all lets talk about updates to current Apps.
&#160;
Bouncy Radio Center v9.1     This was a pretty big update on my part, mainly with new module the Radio [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="buncyservers logo small" border="0" alt="buncyservers logo small" src="http://anthonykinson.co.uk/wp-content/uploads/2009/10/buncyserverslogosmall.png" width="174" height="40" /> </p>
<p>Its been a while since i have posted on my blog, I’ve been crazy busy with lots of updates and new Apps. First of all lets talk about updates to current Apps.</p>
<p>&#160;</p>
<p><strong><u>Bouncy Radio Center v9.1</u></strong>     <br />This was a pretty big update on my part, mainly with new module the Radio On-Demand feature which is now a part of the radio center and comes free at no extra cost to new and existing license holders. radio On-Demand provides a secure way to provide music to your members without compromising the security or privacy of the MP3. in a nutshell, it prevents people downloading the files, and only allows for them to listen to the file “On-Demand”. This is a fantastic way to promote songs you have for sale, as such, i added some features to add buy now links and price fields to each On-Demand file.</p>
<p>As well as this cool new feature some bugs and improvements have been made to the system, for example the RAJAX module has been re-written using an output function in order to feed live data to other hooks and modules. As a result, this prevents those annoying errors people were having in Internet Explorer and other problems where the browser would cache the RAJAX data causing old entries to be shown. This is now a thing of the past.</p>
<p><em><font color="#808080"><u>Bouncy Radio Center 9.1 Change log</u>         <br />FIXED: Listeners chart error after a new installation         <br />FIXED: Scheduling a show with an end time at midnight returns a         <br />BRC302 error that the show cannot end before it has started         <br />FIXED: Problem with the flash charts when a custom admin directory         <br />name is used         <br />FIXED: Problem with the LiveStream Player when a custom Admin         <br />Directory is used         <br />FIXED: Flash Charts do not work when .htaccess is used within         <br />admin directory         <br />FIXED: Livestream player fails to initialize when a .htaccess         <br />file is used within the admin directory         <br />ADDED: Support for Radio Request Hook         <br />ADDED: Support for Bouncy License Control Center Application         <br />FIXED: RAJAX Support for Internet Explorer. data Now updates correctly.         <br />ADDED: New RAJAX Methods and data construction using         <br />$this-&gt;buildOutput() functions.         <br />ADDED: Radio On-Demand feature</font></em></p>
<p>&#160;</p>
<p><strong><u>Bouncy XBox LIVE v2.1        <br /></u></strong>Updates to Bouncy XBox live were mainly just compatibility and fixes for IP.Boards new version of their forum software. A list of changes is below.</p>
<p><em><font color="#808080"><u>Bouncy XBox LIVE 2.1 Change log</u>         <br />FIXED: Public Module Ordering         <br />FIXED: JS Errors in Internet Explorer         <br />FIXED: Theme Errors         <br />ADDED: Support for Bouncy License Control Center Application (REQUIRED)         <br />ADDED: IPB 3.0.4 support         <br />ADDED: Halo 3 theme</font></em></p>
<p><strong><u>Bouncy License Control Center        <br /></u></strong>This is a new app which is required to be installed for the above licensed apps to work correctly. This adds better management of your app licenses as well as finally being able to reset your own local keys, a feature i initially overlooked during the development of these apps. This app will also provide you with latest information directly from us, a list of available apps with links to product pages, purchase pages and latest version information. You will also find some options which load up OUR license control panel right inside your Admin CP!</p>
<p>Check out the image below for some screenshots of the latest apps.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:66721397-FF69-4ca6-AEC4-17E6B3208830:9c624369-cf22-4777-a4d5-1538a4617367" class="wlWriterEditableSmartContent"><a style="border:0px" href="http://cid-ae2e82d86e3a9a60.skydrive.live.com/redir.aspx?page=browse&amp;resid=AE2E82D86E3A9A60!115&amp;ct=photos"><img style="border:0px" alt="View App Screenshots" src="http://anthonykinson.co.uk/wp-content/uploads/2009/10/InlineRepresentation7925fd80cc7249608e6f64cdd8c80894.jpg" /></a>
<div style="width:568px;text-align:right;" ><a href="http://cid-ae2e82d86e3a9a60.skydrive.live.com/redir.aspx?page=browse&amp;resid=AE2E82D86E3A9A60!115&amp;ct=photos">View Full Album</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://anthonykinson.co.uk/programing-internet/217_radio-center-xbox-live-license-control-updates/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bouncy Xbox LIVE Gamertar GD code explained</title>
		<link>http://anthonykinson.co.uk/programing-internet/109_bouncy-xbox-live-gamertar-gd-code-explained</link>
		<comments>http://anthonykinson.co.uk/programing-internet/109_bouncy-xbox-live-gamertar-gd-code-explained#comments</comments>
		<pubDate>Fri, 27 Mar 2009 00:41:36 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Programing & Internet]]></category>
		<category><![CDATA[Avatar]]></category>
		<category><![CDATA[Bouncy Xbox Live]]></category>
		<category><![CDATA[Gamertar]]></category>
		<category><![CDATA[GD]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Xbox]]></category>

		<guid isPermaLink="false">http://anthonykinson.co.uk/anthony_kinson_scripting_design/03/2009/bouncy-xbox-live-gamertar-gd-code-explained/</guid>
		<description><![CDATA[ 
If you don’t already know Bouncy Xbox Live is a new script from BouncyServers which allows your community to add there Xbox Live gamertag to your forum so that your community can easily find and play games with other members.
One of the cool features which was included with Bouncy Xbox Live was the Gamertar. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.bouncyservers.co.uk/BouncyXboxLive/index.htm" target="_blank"><img style="border-right-width: 0px; margin: 0px auto 5px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" src="http://www.bouncyservers.co.uk/images/bxbl/project_img.jpg" width="600" height="268" /></a> </p>
<p>If you don’t already know <a href="http://www.bouncyservers.co.uk/BouncyXboxLive/index.htm" target="_blank">Bouncy Xbox Live</a> is a new script from <a href="http://www.bouncyservers.co.uk" target="_blank">BouncyServers</a> which allows your community to add there Xbox Live gamertag to your forum so that your community can easily find and play games with other members.</p>
<p>One of the cool features which was included with <a href="http://www.bouncyservers.co.uk/BouncyXboxLive/index.htm" target="_blank">Bouncy Xbox Live</a> was the Gamertar. This was basically a small dynamic avatar image which was generated on the fly using a background image and the members Xbox Live avatar. This meant that because it was generated on the fly, the Gamertar would always display the gamers latest avatar style such as hair, clothes and facial features.</p>
<p><img style="border-right-width: 0px; margin: 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" align="left" src="http://www.bouncybootlegs.co.uk/forum/index.php?act=bxbl&amp;do=gamertar&amp;tag=Anthony Kinson" /> </p>
<p>To the left you can see my current gamertar, this will automatically change if and when i update my Xbox live avatar. This uses the default <a href="http://www.bouncyservers.co.uk/BouncyXboxLive/index.htm" target="_blank">Bouncy Xbox Live</a> Gamertar background with a grey border and a golden glow.</p>
<p>Onto the technical stuff.</p>
<p>The gamertar is generated using 2 PHP functions and the GD image library.</p>
<p>The first function is called create_gamertar()</p>
<pre class="prettyprint">function create_gamertar ()
{
//-------------------------
// Fetch And Clean Gamertag
//-------------------------
$gamertag	 = $this-&gt;ipsclass-&gt;input['tag'];
$gamertag = ereg_replace(&quot;[[:space:]]+&quot;, &quot;%20&quot;, $gamertag);
//-----------------------
// Fetch Gamertar Images
//-----------------------
$img_a = imagecreatefrompng(&quot;{$this-&gt;ipsclass-&gt;vars['img_url']}/bxbl_images/gavbg.png&quot;);
$img_b = &quot;http://avatar.xboxlive.com/avatar/{$gamertag}/avatar-body.png&quot;;
//---------------------
// Set Max Avatar Size
//---------------------
$width = 80;
$height = 160;
//--------------------
// Get New Dimensions
//--------------------
list($width_orig, $height_orig) = getimagesize($img_b);
$ratio_orig = $width_orig/$height_orig;
if ($width/$height &gt; $ratio_orig)
{
	$width = $height*$ratio_orig;
}
else
{
	$height = $width/$ratio_orig;
}
//----------
// Resample
//----------
$image_p = imagecreatetruecolor($width, $height);
imagecolortransparent($image_p, imagecolorallocate($image_p, 0, 0, 0));
imagealphablending($image_p, false);
imagesavealpha($image_p, true);
$image = imagecreatefrompng($img_b);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
//---------------------------------------
// Copy, Merge, Resize With Transparency
//---------------------------------------
$this-&gt;imagecopymerge_alpha($img_a, $image_p, 0, 0, 10, 10, 64, 57,100);
//---------------
// Output Images
//---------------
header(&quot;Content-Type: image/png&quot;);
imagesavealpha($img_a, true);
imagepng($img_a, NULL);
imagedestroy($img_a);
imagedestroy($img_b);
}</pre>
<p>pretty straight forward function so lets go over each step</p>
<p>First of all</p>
<pre class="prettyprint">//-------------------------
// Fetch And Clean Gamertag
//-------------------------
$gamertag	 = $this-&gt;ipsclass-&gt;input['tag'];
$gamertag = ereg_replace(&quot;[[:space:]]+&quot;, &quot;%20&quot;, $gamertag);</pre>
<p>as mentioned in the quote, this fetches and cleans the gamertag, this has to be done firstly because gamertag&#8217;s can contain spaces between characters, and secondly because sometimes i like to obey the standards. So this function first of all saves the members gamertag in the $gamertag variable and then converts any spaces to %20 so it would turn “Anthony Kinson” into “Anthony%20Kinson”.</p>
<p>The next piece of code…</p>
<pre class="prettyprint">//-----------------------
// Fetch Gamertar Images
//-----------------------
$img_a = imagecreatefrompng(&quot;{$this-&gt;ipsclass-&gt;vars['img_url']}/bxbl_images/gavbg.png&quot;);
$img_b = &quot;http://avatar.xboxlive.com/avatar/{$gamertag}/avatar-body.png&quot;;
//---------------------
// Set Max Avatar Size
//---------------------
$width = 80;
$height = 160;
//--------------------
// Get New Dimensions
//--------------------
list($width_orig, $height_orig) = getimagesize($img_b);
$ratio_orig = $width_orig/$height_orig;
if ($width/$height &gt; $ratio_orig)
{
	$width = $height*$ratio_orig;
}
else
{
	$height = $width/$ratio_orig;
}</pre>
<p>OK, so nice brief explanation. img_a grabs the Gamertars background image i previously mentioned from the forums skin directory (this allows a different background for each installed skin) and img_b retrieves the members avatar using the previously formatted gamertag.</p>
<p>After this the avatars width and height are edited, this allows us to shrink the avatar so it fits in the Gamertar. The next block of code sets the new dimensions maintaining the aspect ratio.</p>
<pre class="prettyprint">//----------
// Resample
//----------
$image_p = imagecreatetruecolor($width, $height);
imagecolortransparent($image_p, imagecolorallocate($image_p, 0, 0, 0));
imagealphablending($image_p, false);
imagesavealpha($image_p, true);
$image = imagecreatefrompng($img_b);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);</pre>
<p>The above code then resample&#8217;s the image whilst maintaining aspect ratio and pixel transparency within the png. This lead to a problem and the creation of the second function imagecopymerge_alpha(). As it goes, when you merge 2 images using GD in PHP specifically PNG images, the transparency is lost, resulting in a solid black background being applied to the avatar image, the problem with this is that it just creates a cropped avatar with a black background and the gamertar background is not visible.</p>
<pre class="prettyprint">//---------------------------------------
// Copy, Merge, Resize With Transparency
//---------------------------------------
$this-&gt;imagecopymerge_alpha($img_a, $image_p, 0, 0, 10, 10, 64, 57,100);</pre>
<p>This is where the above bit of code comes into play. This bit of code then sends our avatar to the imagecopymerge_alpha() function with all the data needed.</p>
<p>So, here is the imagecopymerge_alpha() function…</p>
<pre class="prettyprint">function imagecopymerge_alpha($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct){
if(!isset($pct))
{
return false;
}
$pct /= 100;
//---------------------------
// Get Image Width And Height
//---------------------------
$w = imagesx( $src_im );
$h = imagesy( $src_im );
//-------------------------
// Turn Alpha Blending Off
//-------------------------
imagealphablending( $src_im, false );
//-----------------------------------------
// Find The Most Opaque Pixel In The Image
//-----------------------------------------
$minalpha = 127;
for( $x = 0; $x &lt; $w; $x++ )
for( $y = 0; $y &lt; $h; $y++ )
{
$alpha = ( imagecolorat( $src_im, $x, $y ) &gt;&gt; 24 ) &amp; 0xFF;
if( $alpha &lt; $minalpha )
{
$minalpha = $alpha;
}
}
//----------------------------------------------------
// Loop Through Image Pixels And Modify Alpha For Each
//----------------------------------------------------
for( $x = 0; $x &lt; $w; $x++ )
{
for( $y = 0; $y &lt; $h; $y++ )
{
//-----------------------------------------------------
// Get Current Alpha Value (Represents The Transparency)
//-----------------------------------------------------
$colorxy = imagecolorat( $src_im, $x, $y );
$alpha = ( $colorxy &gt;&gt; 24 ) &amp; 0xFF;
//--------------------
// Calculate New Alpha
//--------------------
if( $minalpha !== 127 )
{
$alpha = 127 + 127 * $pct * ( $alpha - 127 ) / ( 127 - $minalpha );
}
else
{
$alpha += 127 * $pct;
}
//-----------------------------------
// Get The Colour Index With New Alpha
//-----------------------------------
$alphacolorxy = imagecolorallocatealpha( $src_im, ( $colorxy &gt;&gt; 16 ) &amp; 0xFF, ( $colorxy &gt;&gt; 8 ) &amp; 0xFF, $colorxy &amp; 0xFF, $alpha );
//---------------------------------------
// Set Pixel With The New Colour + Opacity
//---------------------------------------
if( !imagesetpixel( $src_im, $x, $y, $alphacolorxy ) )
{
return false;
}
}
}
//---------------
// The Image Copy
//---------------
imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h);
}</pre>
<p>There is no point in me going over each detail of this function, it pretty mush stays the same however you use it. As you can see from the code quotes it basically finds the most opaque pixel and then calculates the new alpha blending. After which it is returned back to the create_gamertar() function. and is output through the following final piece of code</p>
<pre class="prettyprint">//---------------
// Output Images
//---------------
header(&quot;Content-Type: image/png&quot;);
imagesavealpha($img_a, true);
imagepng($img_a, NULL);
imagedestroy($img_a);
imagedestroy($img_b);</pre>
<p>Above again is pretty simple. It just sets the output content type, in this case, its a PMG image.</p>
<p>This code can be pretty much be used stand alone, of course though, you will need to create some sort of switch or post info so for example the URL <a href="http://yoursite.com/gamertar.php?gamertag=Anthony%20Kinson">http://yoursite.com/gamertar.php?gamertag=Anthony%20Kinson</a> would set the gamertag to be used as Anthony Kinson something maybe like $gamertag = $_POST[‘gamertag’];</p>
<p>its completely up to you how you go about it, but these are the basic principles to how the gamertar is created.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonykinson.co.uk/programing-internet/109_bouncy-xbox-live-gamertar-gd-code-explained/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
