<?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/"
	>

<channel>
	<title>TheBroth</title>
	<link>http://www.thebroth.com/blog</link>
	<description>The Global Mosaic</description>
	<pubDate>Fri, 22 Jun 2007 05:24:27 +0000</pubDate>
	<language>en</language>
			<item>
		<title>PuzzleBee - Facebook app: Share your photos as jigsaw puzzles</title>
		<link>http://www.thebroth.com/blog/213/jigsaw-puzzles-on-facebook</link>
		<comments>http://www.thebroth.com/blog/213/jigsaw-puzzles-on-facebook#comments</comments>
		<pubDate>Thu, 21 Jun 2007 04:39:26 +0000</pubDate>
		<dc:creator>markus</dc:creator>
		
	<category>Developer Diary</category>
		<guid isPermaLink="false">http://www.thebroth.com/blog/213/puzzlebee-thebroth-artworks-as-jigsaw-puzzles-on-facebook</guid>
		<description><![CDATA[Today we&#8217;ve released Puzzlebee, an application for the Facebook platform. Puzzlebee allows you to create jigsaw puzzles from your own photos and share them with your friends! 

If you have a facebook account, here&#8217;s the link to the application:
http://www.facebook.com/apps/application.php?id=2356957881
Experienced real life jigsaw fans will be pleased with the game mechanics. Puzzle pieces and completed sections [...]]]></description>
			<content:encoded><![CDATA[<p>Today we&#8217;ve released Puzzlebee, an application for the Facebook platform. Puzzlebee allows you to create jigsaw puzzles from your own photos and share them with your friends! <a id="more-213"></a></p>
<div class="align_right content_image"><a href="http://www.facebook.com/apps/application.php?id=2356957881"><img src="http://img.puzzlebee.com/puzzle_bee_abouts.jpg" alt="facebook jigsaw puzzle" /></a></div>
<p>If you have a facebook account, here&#8217;s the link to the application:</p>
<p><a href="http://www.facebook.com/apps/application.php?id=2356957881">http://www.facebook.com/apps/application.php?id=2356957881</a></p>
<p>Experienced real life jigsaw fans will be pleased with the game mechanics. Puzzle pieces and completed sections can be rotated freely and intuitively. A built-in timer allows you to compare your best times with those of your friends.</p>
<h3>Mystery mode&#8230; what the ^&#038;%$ am I puzzling..?</h3>
<div class="align_left content_image"><img src="http://img.puzzlebee.com/puzzlebee_example120.jpg" alt="jigsaw puzzle example" /></div>
<p>One of the most popular features appears to be the &#8220;mystery mode&#8221;. When you upload your own photo, you can choose to make the puzzle a mystery puzzle. Your friends won&#8217;t be able to see the complete image until they&#8217;ve solved the puzzle!</p>
<p>Somehow I feel this mode is going to cause a few &#8220;surprises&#8221;&#8230; I hope only pleasant ones! ;-)</p>
<p>&#8212;-</p>
<p>Update: We got a really good review of Puzzlebee from the folks over at Facereviews.com: Read it here:<br />
<a href="http://facereviews.com/2007/06/21/facebook-puzzlebee-application-drives-me-crazy">http://facereviews.com/2007/06/21/facebook-puzzlebee-application-drives-me-crazy</a>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.thebroth.com/blog/213/jigsaw-puzzles-on-facebook/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Server upgrades - please expect downtime</title>
		<link>http://www.thebroth.com/blog/212/server-upgrades-please-expect-downtime</link>
		<comments>http://www.thebroth.com/blog/212/server-upgrades-please-expect-downtime#comments</comments>
		<pubDate>Sun, 10 Jun 2007 07:16:10 +0000</pubDate>
		<dc:creator>markus</dc:creator>
		
	<category>Developer Diary</category>
		<guid isPermaLink="false">http://www.thebroth.com/blog/212/server-upgrades-please-expect-downtime</guid>
		<description><![CDATA[TheBroth server gets more RAM and some software updates. During the 24-48 hours, expect intermittent outages where TheBroth is not accessible.
There&#8217;s exciting new features in development but they require that the server is updated. We&#8217;ll have 2 more GB of RAM in it, and we&#8217;ll install a number of software components that are essential for [...]]]></description>
			<content:encoded><![CDATA[<p>TheBroth server gets more RAM and some software updates. During the 24-48 hours, expect intermittent outages where TheBroth is not accessible.<a id="more-212"></a></p>
<p>There&#8217;s exciting new features in development but they require that the server is updated. We&#8217;ll have 2 more GB of RAM in it, and we&#8217;ll install a number of software components that are essential for future growth and scaling of the service.</p>
<p>These upgrades are performed by our hosting partner and we don&#8217;t have control when exactly the downtime will occur or how long it will take exactly. From experience, I would expect each downtime to not last longer than one hour. I expect 2-3 of these outages in the coming days.</p>
<p>We won&#8217;t know for sure whether the software upgrades will be compatible with the existing code on TheBroth. These things are always difficult to predict, but we&#8217;ll do our best to get it all fixed up as bugs rear their ugly heads.</p>
<p>Please keep us informed if you find things aren&#8217;t working right by posting in the bug reports forum - let&#8217;s hope that forum software keeps working :-)</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.thebroth.com/blog/212/server-upgrades-please-expect-downtime/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>New art form: Graffiti/freehand</title>
		<link>http://www.thebroth.com/blog/211/new-art-form-graffiti</link>
		<comments>http://www.thebroth.com/blog/211/new-art-form-graffiti#comments</comments>
		<pubDate>Sat, 19 May 2007 06:11:08 +0000</pubDate>
		<dc:creator>markus</dc:creator>
		
	<category>Developer Diary</category>
	<category>New Features</category>
		<guid isPermaLink="false">http://www.thebroth.com/blog/211/new-art-form-graffiti</guid>
		<description><![CDATA[TheBroth as a platform for collaborative art will soon see whole range of new art forms. One of the coolest art forms, graffiti, will soon enter open beta. 
NOTE: If you like to test the new graffiti mode, please message Zaphod B to gain access. 
So what does that mean - does it mean the [...]]]></description>
			<content:encoded><![CDATA[<p>TheBroth as a platform for collaborative art will soon see whole range of new art forms. One of the coolest art forms, graffiti, will soon enter open beta. <a id="more-211"></a></p>
<p>NOTE: If you like to test the new graffiti mode, please message <a href="/profile3017.html">Zaphod B</a> to gain access. </p>
<p>So what does that mean - does it mean the end of mosaics? No! Of course not. Mosaics will stay. Art of different types will coexist. The point is - at TheBroth, you can collaborate. You can load and continue and alter others&#8217; works.</p>
<p>All the amazing TheBroth features that we&#8217;ve been able to introduce since we moved the tile rendering from Ajax to Flash will still be there. Dragging, rotation, multi-move, slide-under&#8230; you name it! Just don&#8217;t expect it in the early beta! :-)</p>
<p>This new mode - some call it sketching, drawing, freehand, painting, or graffiti - and the whole bunch of new modes we&#8217;ve got in the pipeline, they&#8217;ll have all the features that make TheBroth what it is: You can work together, you can watch others, you can work alone, you can import, change, view the replay&#8230; and use all those nifty tricks in terms of moving, dragging, rotating. </p>
<h3>Limitations</h3>
<p>And you&#8217;ll be somehow limited too - not unlike the mosaic, there&#8217;ll be a limit to how many strokes you can do. This is just how TheBroth works: imagine we had a public graffiti room and people would just add more and more and more layers of virtual paint. Before you know it, it would take FOREVER to load all the data that make up that painting.</p>
<p>So - there will be a limit of strokes. We call them paths. When you begin to draw a line, you&#8217;re basically adding lots of points, and when you release the mouse, the path is complete and stored with your name. This way everyone can still see who&#8217;s moving what and what the individual contributions are once the artwork is saved. </p>
<p>We&#8217;ll be limiting the amount of points that can be used in each room. When all the points are used up, but people continue to paint, then old points will be recycled so that there&#8217;s never more than a certain number of points used. We&#8217;ll choose a number that is high enough to allow for detailed artworks but low enough so that each room or artwork can load quickly. </p>
<p>A (welcome) side effect of this limitation of available points is yet again a leveling of the playing field. You can&#8217;t just add layer after layer of paint - you have to be economical. This is not Photoshop or Paintshop Pro or Coreldraw or whatever your favorite drawing application is. This is collaborative art on the internet, free, in your web browser! :-)</p>
<h3>A new beginning&#8230;</h3>
<p>Let this serve as the official announcement that TheBroth as a collaborative art platform has sufficiently matured. We&#8217;re now ready to add a lot of cool new art forms to &#8230; ermm&#8230; the broth. I can&#8217;t even spell that any other than TheBroth anymore.. :-)</p>
<p>This new mode we&#8217;re calling graffiti for now because that&#8217;s where the inspiration came from. When we showed TheBroth to new users, they often felt that making art with tiles just takes too long. Well, one thing is certainly true, good mosaic artworks take a least an hour. We just have to accept, advanced mosaicing is not for everyone! </p>
<p>Now, everyone is familiar with paint programs, and in this new mode, you&#8217;ll be able to create something quite acceptable in 30 seconds flat. I am certain that once we have all the advanced features, people will again begin tinkering and create art that&#8217;s so outstanding, you could NOT create it 30 seconds. But the difference is - in the mosaic, you can&#8217;t do much in 5-10 minutes. In the graffiti mode, you can.</p>
<p>I believe that good mosaics are so outstanding and amazing because they are mosaics. They will always look a tad different than graffiti art - and certainly different from these other (top secret, hush hush) art forms that we&#8217;re going to implement soon.</p>
<p>I&#8217;m going to also announce this in the forum because it&#8217;s easier to comment there - and I have the feeling that there&#8217;ll be some comments to this revelation! :-)</p>
<p>Discuss in the forum: <a href="http://www.thebroth.com/forum/viewtopic.php?p=6770#6770">http://www.thebroth.com/forum/viewtopic.php?p=6770</a></p>
]]></content:encoded>
			<wfw:commentRSS>http://www.thebroth.com/blog/211/new-art-form-graffiti/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Artworks in PNG and JPEG format</title>
		<link>http://www.thebroth.com/blog/206/artworks-in-png-and-jpeg-format</link>
		<comments>http://www.thebroth.com/blog/206/artworks-in-png-and-jpeg-format#comments</comments>
		<pubDate>Fri, 16 Mar 2007 09:13:23 +0000</pubDate>
		<dc:creator>markus</dc:creator>
		
	<category>Developer Diary</category>
		<guid isPermaLink="false">http://www.thebroth.com/blog/206/artworks-in-png-and-jpeg-format</guid>
		<description><![CDATA[PNG is a very effective format for graphics, offering loss-less compression. It worked particularly well for the older type of mosaic artworks that were made out of unrotated and untextured tiles. However, it&#8217;s no good no more. What happened?
The new feature of tile rotation and in particular custom textures introduced a great amount of pixel-level [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Png">PNG</a> is a very effective format for graphics, offering loss-less compression. It worked particularly well for the older type of mosaic artworks that were made out of unrotated and untextured tiles. However, it&#8217;s no good no more. What happened?<a id="more-206"></a></p>
<p>The new feature of tile rotation and in particular custom textures introduced a great amount of pixel-level detail, and so PNG is no longer a good choice. <a href="http://en.wikipedia.org/wiki/Jpeg">JPEG</a>, a lossy-compression image format, is better suited for this type of material.</p>
<p>Our main goal was to have the actual artworks load as fast as possible, and so we needed to keep the file size down. JPEG is very well suited for the new type of rotated, textured tiles, but horrible for the old-style artworks. PNG is great for old-style artworks, but REALLY horrible for the new ones with tile rotation and textures.</p>
<p>Just how horrible is horrible? JPEG on old-style artworks typically doubles the file size. That&#8217;s bad. But PNG on new-style artworks increases the file size about 5-10 times! We&#8217;re talking 300-400 K here. This is quite unacceptable on anyone&#8217;s connection.</p>
<p>The only solution was to use whatever is producing the smaller file for each artwork. This happens auto-magically when you take a snapshot. It will actually save both the PNG and JPEG version, but the artwork page will display whatever image file has the smaller file size.</p>
<p>So if you ever feel that the JPEG compression produces too many artifacts and you&#8217;d like to see the artwork in its full and unadulterated glory, just manually change the file ending of the actual artwork image file to &#8220;.png&#8221;.</p>
<p>For example, the image file of <a href="http://www.thebroth.com/art18152.html">Artwork 18152</a> is <a href="http://www.thebroth.com/gal/im18152.jpg">http://www.thebroth.com/gal/im18152.jpg</a> - thus <a href="http://www.thebroth.com/gal/im18152.png">http://www.thebroth.com/gal/im18152.png</a> is the PNG version of the image.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.thebroth.com/blog/206/artworks-in-png-and-jpeg-format/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Flash/Amfphp data transfer: using strings is fastest</title>
		<link>http://www.thebroth.com/blog/205/flashamfphp-data-transfer-using-strings-is-fastest</link>
		<comments>http://www.thebroth.com/blog/205/flashamfphp-data-transfer-using-strings-is-fastest#comments</comments>
		<pubDate>Fri, 23 Feb 2007 04:13:38 +0000</pubDate>
		<dc:creator>markus</dc:creator>
		
	<category>Developer Diary</category>
		<guid isPermaLink="false">http://www.thebroth.com/blog/205/flash-and-amfphp-use-strings-for-datatransfer</guid>
		<description><![CDATA[This post compares transfer time and execution speed of several methods of data exchange between the Flash player and amfphp-enabled gateway on the server, written in PHP. Our test results indicate that for larger arrays (with approx. 1000 elements), using strings performs better than transferring array objects or mysql result sets.
Amfphp
For those not familiar with [...]]]></description>
			<content:encoded><![CDATA[<p>This post compares transfer time and execution speed of several methods of data exchange between the Flash player and amfphp-enabled gateway on the server, written in PHP. Our test results indicate that for larger arrays (with approx. 1000 elements), using strings performs better than transferring array objects or mysql result sets.<a id="more-205"></a></p>
<h2>Amfphp</h2>
<p>For those not familiar with Amfphp, here is a description from the <a href="http://www.amfphp.org/">Amfphp</a> website:</p>
<blockquote><p>Amfphp is an RPC toolkit for PHP. It allows seamless communication between PHP and :</p>
<p>    * Flash and Flex with Remoting<br />
    * JavaScript and Ajax with JSON<br />
    * XML clients with XML-RPC</p>
</blockquote>
<p>Essentially, Amfphp converts certain PHP data types to their Actionscript equivalent data types, and where possible, converts Actionscript data types to their PHP equivalents. For example, it can convert a PHP <code>array</code> into an Actionscript <code>Array</code>, or a PHP <code>resource</code> (e.g., a mysql_result result) into an Actionscript <code>Recordset</code>.</p>
<h2>Gzip and PHP/Actionscript data type decisions</h2>
<p>Since  <a href="http://www.5etdemi.com/blog/archives/2007/01/amfphp-19-beta-2-ridiculously-faster/">Amfphp 1.9 beta 2</a>, Amfphp has included an option to use gzip compression on the data sent back to the client.  This new feature of Amfphp, coupled with suspicions that splitting strings in Actionscript was time consuming,  made us rethink our current data exchange method between Flash, Amfphp and PHP, so we thought it was time to experiment some more with the different data types. </p>
<p><strong>Our goal was simple: to find which data types resulted in Actionscript having the data available and ready to process in the least amount of time</strong>. </p>
<p>In our specific case, we use Ampfphp to get information about each TheBroth mosaic from the server to the Flash player on the client side. We needed to determine which of the available methods takes the least amount of time to have the data ready to pass to our tile generating function <code>createTile</code> on the client side.</p>
<p>For our experiments, the <code>$gateway->enableGzipCompression(25*1024);</code> line in Amfphp&#8217;s <code>gateway.php</code> setting was changed to <code>$gateway->enableGzipCompression(5*1024);</code>. This was because the uncompressed content length of our testing string result was less than the default Amfphp gzip threshold of 25KB (it was about 21KB, to be exact).</p>
<h3>Mysql table structure</h3>
<p>Here&#8217;s the Mysql table create code for the test data we used in this experiment. Each loading will select 1000 rows from the database, eg. SLOTSCOUNT=1000.</p>
<pre>
CREATE TABLE `thebroth_experiment` (
  `set_id` int(11) NOT NULL default '0',
  `slot_number` smallint(6) NOT NULL default '0',
  `x` smallint(6) default '0',
  `y` smallint(6) default '0',
  `move_number` int(11) unsigned NOT NULL default '0',
  `color` char(6) NOT NULL default '',
  `rotation` smallint(6) NOT NULL default '0',
  PRIMARY KEY  (`set_id`,`slot_number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
</pre>
<p>In the context of this experiment, the sql queries only selected slot_number, x, y, color and rotation. The server in this experiment was a Dual AMD Opteron 246 2.0 GHz with 2 GB RAM and little load. It runs Mysql 5.0.22 and Php version 4.3.9. This PHP version was *not* recompiled with amfphp.</p>
<h3>PHP/Actionscript data type options</h3>
<h4>PHP string to Actionscript String</h4>
<p>Approach: Create a comma separated PHP <code>string</code> on the server side, and let the client side Actionscript split the Actionscript <code>String</code> into an Actionscript <code>Array</code>  in order to loop through the data.</p>
<p>Server side code:</p>
<pre>
function getTilesAsString() {
	$ret = mysql_query($sql);

	while ($t = mysql_fetch_assoc($ret)) {
		$s .= "$t[n],$t[x],$t[y],$t[c],$t[r]\n"; // where n,x,y,c,r were the attributes whose values we wanted
	}

	return trim($s);
}
</pre>
<p>Client side code:</p>
<pre>
function handleDataString(re:ResultEvent) {
	lines = re.result.split("\n");
	for(var i=0; i < SLOTSCOUNT; i++) {
		var tile = lines[i].split(",");
		//createTile(Number(tile[0]), Number(tile[1]), Number(tile[2]), tile[3], Number(tile[4]));
	}
}
</pre>
<h4>PHP array to Actionscript Array</h4>
<p>Approach: Create a PHP <code>array</code> on the server side, and let the Actionscript loop through the data as an Actionscript <code>Array</code>.</p>
<p>Server side code:</p>
<pre>

function getTilesAsArray() {
	$ret = mysql_query($sql);

	while ($t = mysql_fetch_assoc($ret)) {
		$r[] = $t;
	}

	return $r;
}
</pre>
<p>Client side code:</p>
<pre>
function handleDataArray(re:ResultEvent) {
	for(var i=0; i < SLOTSCOUNT; i++) {
		var tile = re.result[i];
		//createTile(Number(tile['n']), Number(tile['x']), Number(tile['y']), tile['c'], Number(tile['r']));
	}
}
</pre>
<h4>PHP resource to Actionscript Recordset</h4>
<p>Approach: Create a PHP Mysql <code>Resource</code> on the server side, and let the Actionscript loop through the data as an Actionscript <code>RecordSet</code>.</p>
<p>Server side code:</p>
<pre>
function getTilesAsMysqlResult() {
	return mysql_query($sql)
}
</pre>
<p>Client side code:</p>
<pre>
function handleDataMysql(re:ResultEvent) {
	var rs:RecordSet = RecordSet(re.result);
	for(var i=0; i < SLOTSCOUNT; i++) {
		var tile = rs.getItemAt(i);
		//createTile(Number(tile['n']), Number(tile['x']), Number(tile['y']), tile['c'], Number(tile['r']));
	}
}
</pre>
<h2>Results</h2>
<p>The following tables show the values that varied depending on the data types used:</p>
<h3>Server side</h3>
<table class="display_t" border="2">
<tr>
<th>Data type</th>
<th>Uncompressed size (bytes)</th>
<th>Amfphp encode time (ms) <sup>1</sup></th>
<th>PHP result creation (ms)</th>
<th>total (ms)</th>
<th>Content-length (bytes)</th>
</tr>
<tr>
<td>array</td>
<td>49584</td>
<td>368 (sd 10.2)</td>
<td>8.75 (sd 2.8)</td>
<td>376.75</td>
<td>12940</td>
</tr>
<tr>
<td>mysql</td>
<td>50312</td>
<td>125.25 (sd 1.9)</td>
<td>n/a</td>
<td>125.25</td>
<td>14099</td>
</tr>
<tr>
<td>string</td>
<td>20581</td>
<td>2.5 (sd 0.6)</td>
<td>11 (sd 0)</td>
<td>13.5</td>
<td>10420</td>
</tr>
</table>
<p><sup>1</sup> <small>Measured using Amfphp&#8217;s service browser.</small></p>
<p>Notes:</p>
<p>&#8216;Amfphp encode time&#8217; : the time taken by Amfphp to convert the PHP variable into the equivalent Actionscript variable.<br />
&#8216;PHP result creation&#8217; : the time taken by PHP to convert the Mysql result resource into the PHP variable to send back to Amfphp. In the server side code examples above, it&#8217;s the <code>while</code> loop.<br />
&#8216;total&#8217;: the sum of the above 2 times.<br />
&#8216;Content-length&#8217;: the number of bytes used for the response that Amfphp created for the client.</p>
<h3>Client side</h3>
<p>&#8216;client function&#8217; is the time it took to run the Actionscript function for the particular data type. For testing, the calls to <code>createTile</code> were commented out (they remain in the code to show that the data are in a state ready to be used in such a way).</p>
<p><b>Machines used</b></p>
<ol>
<li>Laptop: P3 895 MHz 256MB RAM WIN XP	FF 1.509 Shockwave Flash 9.0 r28</li>
<li>Desktop: AMD Athlon XP 2500+ 512MB RAM Firefox/2.0 (Ubuntu-edgy) Shockwave Flash 9.0 r31</li>
<li>Mac: Imac 1.8 GHz PPC G5 512MB RAM Firefox/2.0 OSX 10.4.8	Shockwave Flash 9.0 r28</li>
</ol>
<table class="display_t" border="2">
<tr>
<th></th>
<th colspan="3">execution time of client function (ms)</th>
</tr>
<tr>
<th>Data type</th>
<th>Laptop</th>
<th>Desktop</th>
<th>Mac</th>
</tr>
<tr>
<td>array</td>
<td>20 (sd 0)</td>
<td>8.5 (sd 0.58)</td>
<td>15 (sd 0)</td>
</tr>
<tr>
<td>mysql</td>
<td>50.25 (sd 0.5)</td>
<td>21.25 (sd 0.5)</td>
<td>39.75 (sd 11.84)</td>
</tr>
<tr>
<td>string</td>
<td>67.75 (sd 5.19)</td>
<td>26.75 (sd 0.5)</td>
<td>58.25 (sd 3.3)</td>
</tr>
</table>
<p>As you can see from the results, the extra time taken to split the string into an array on the client side (47.75 ms longer for string splitting than using the array method, on the slow laptop) is still a lot less than the extra server side processing time required for the non-string types (363.25 ms for the PHP array, 111.75 ms for the PHP resource). The string response is also the smallest download of the three methods. </p>
<p>It is also important to note that each client will cause the extra time processing time on the server, so moving the processing effort and time to the client is a good idea when you wish to reduce server load.</p>
<h3>Summary</h3>
<p>Based on our observations, we recommend the following:</p>
<p>Unless your clients&#8217; processing power is extremely limited (in which case the client side string to array processing can take significantly longer), transfer the data as a comma separated string.</p>
<p>Disclaimer: For smaller or much larger arrays or other datatypes the above results may not apply.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.thebroth.com/blog/205/flashamfphp-data-transfer-using-strings-is-fastest/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Better image thumbnails with MagickWand</title>
		<link>http://www.thebroth.com/blog/204/better-image-thumbnails-with-magickwand</link>
		<comments>http://www.thebroth.com/blog/204/better-image-thumbnails-with-magickwand#comments</comments>
		<pubDate>Thu, 15 Feb 2007 05:44:19 +0000</pubDate>
		<dc:creator>markus</dc:creator>
		
	<category>Developer Diary</category>
		<guid isPermaLink="false">http://www.thebroth.com/blog/204/better-image-thumbnails-with-magickwand</guid>
		<description><![CDATA[We have recently improved our gallery views by making the thumbnails larger and clearer, thanks to switching from PHP&#8217;s GD library to Magickwand, a PHP API for ImageMagick.
Features of now having larger thumbnails in the gallery views:

Example thumbnail


20% larger thumbs: now 146&#215;90 px (was 130&#215;80 px)
better image quality - a lot clearer, better colors and [...]]]></description>
			<content:encoded><![CDATA[<p>We have recently improved our gallery views by making the thumbnails larger and clearer, thanks to switching from PHP&#8217;s GD library to Magickwand, a PHP API for ImageMagick.<a id="more-204"></a></p>
<p>Features of now having larger thumbnails in the <a href="/gallery.html">gallery</a> views:</p>
<div class="content_image align_right"><a href="/art15125.html"><img src="/gal/th15125.jpg" alt="Magickwand thumbnail" /></a><br />
<p class="caption">Example thumbnail</p>
</div>
<ul>
<li>20% larger thumbs: now 146&#215;90 px (was 130&#215;80 px)</li>
<li>better image quality - a lot clearer, better colors and more detail</li>
<li>30% smaller file size -> faster loading of gallery views </li>
</ul>
<p>Read more about this in the forum (and how to clear your browser&#8217;s cache to expel the old small size thumbs): <a href="http://www.thebroth.com/forum/viewtopic.php?p=5892">http://www.thebroth.com/forum/viewtopic.php?p=5892</a></p>
<p>The improvement of large artwork thumbnails was made possible thanks to using a different graphics library than before. We used to use PHP&#8217;s built-in <a href="http://www.php.net/gd">GD library</a>, but we&#8217;ve now switched over to the vastly more powerful <a href="http://www.magickwand.org/">Magickwand</a> library.</p>
<p>Magickwand&#8217;s documentation can be considered to be somewhere between &#8220;sparse&#8221; and &#8220;non-existent&#8221;. There&#8217;s a whole bunch of functions (434 different Magickwand functions, can you believe it?!) and they are each somewhat documented, but how to actually achieve anything at all in concert, that appears to be somewhat of a secret. </p>
<h3>How to use ImageMagick for PHP</h3>
<p>We recently achieved some loading, resizing, positioning, framing, rectangling, etc using MagickWand with our <a href="http://www.thebroth.com/forum/viewtopic.php?t=631">live active rooms preview image</a>. If there&#8217;s interest, I&#8217;ll post the whole source code in the developer blog.</p>
<p>In fact, I think I&#8217;ll write a whole bunch of developer blog entries (or a whole darn book!) on how to use ImageMagick for PHP. I bet other programmers have had similar challenges trying to wrap their minds around how to use that beast. </p>
<p>If you&#8217;re used to GD library (or if you&#8217;re unfamiliar with graphics libraries), I can tell you, it&#8217;s not all that obvious how to use Magickwand for even the simplest graphics tasks, let&#8217;s just say that. :-)
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.thebroth.com/blog/204/better-image-thumbnails-with-magickwand/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Tile rotation not noticeable in thumbnails</title>
		<link>http://www.thebroth.com/blog/202/tile-rotation-not-noticeable-in-thumbnails</link>
		<comments>http://www.thebroth.com/blog/202/tile-rotation-not-noticeable-in-thumbnails#comments</comments>
		<pubDate>Sun, 11 Feb 2007 09:47:17 +0000</pubDate>
		<dc:creator>markus</dc:creator>
		
	<category>Developer Diary</category>
		<guid isPermaLink="false">http://www.thebroth.com/blog/202/tile-rotation-not-noticable-in-thumbnails</guid>
		<description><![CDATA[Since the inception of TheBroth, we wanted to be able to rotate the tiles. This would make artworks possible that look like real mosaics, instead of the somewhat computerish, pixelated artworks that are the result of upright square tiles. Interestingly, tile rotation has no effect on the thumbnails, by which many artworks are rated. 



How [...]]]></description>
			<content:encoded><![CDATA[<p>Since the inception of TheBroth, we wanted to be able to rotate the tiles. This would make artworks possible that look like real mosaics, instead of the somewhat computerish, pixelated artworks that are the result of upright square tiles. Interestingly, tile rotation has no effect on the thumbnails, by which many artworks are rated. <a id="more-202"></a></p>
<div class="align_right" style="width:190px">
<div class="content_image" style="background:#B0D5FA!important">
<img class="content_image" src="http://img.thebroth.com/unrotated_example.png" alt="unrotated" /><br />
<p class="caption">How straight up tiles used to look</p>
<p><img class="content_image" src="http://img.thebroth.com/rotation_example.png" alt="rotation" /><br />
<p class="caption">Rotation of tiles in 5 degree steps. Star-like and disk-like objects can be created by placing tiles in the same position but with different rotation.</p>
</div>
</div>
<p>For the longest time, tile rotation remained elusive, caused by the implementation of TheBroth using Javascript that provides only limited means for advanced graphical effects. We thought it would be REALLY worth having tile rotation though, so we eventually decided to reprogram TheBroth core functionality in Flash. We&#8217;re making good progress, and hopefully it is only a matter of weeks until the potential of artworks on TheBroth is GREATLY improved.</p>
<p>I can hardly contain myself, so enormous is the excitement, but in a nutshell: It rocks. :-)</p>
<h3>Rotation in artwork thumbnails  - it&#8217;s not visible!</h3>
<p>Anyway, this post isn&#8217;t really about tile rotation and all the other nifty things that are possible thanks to moving TheBroth to Flash. In fact, it&#8217;s about the interesting effect that tile rotation is simply not noticable at all when looking at thumbnails.</p>
<p>Without further ado, let&#8217;s jump straight to the proof. The following are thumbnails of the exact same room, shown with rotation of tiles and without.</p>
<p>The first one is a little birdy. It&#8217;s a very nice piece of art. I took the liberty to import <a href="http://www.thebroth.com/art17391.html">this snapshot</a> into a private room with an early alpha of Flash-enabled tile rotation. I am not exactly a gifted artist, but it was a breeze to smoothen out the image by rotating some of the tiles.</p>
<p>Here&#8217;s the result (all images saved as JPEG with 45% quality setting):</p>
<div class="align_left"><img class="content_image" src="http://img.thebroth.com/blog/bird146a.jpg" alt=""/><br />
<p class="caption">With tile rotation, 146&#215;90 px</p>
</div>
<div class="align_left"><img class="content_image" src="http://img.thebroth.com/blog/bird146b.jpg" alt=""/><br />
<p class="caption">Original image, 146&#215;90 px</p>
</div>
<p><br clear="all"/></p>
<p>While the above images are actually different on a pixel level, the point is: They LOOK the same.</p>
<p>Needless to say, using our current thumbnail size that&#8217;s even smaller (130&#215;80 px), there&#8217;s even less of a difference - if that makes any sense, since there is no visible difference at the larger 146&#215;90 px resolution either. </p>
<p>To really see any noticable difference, we would have to make the thumbnails a lot larger. Here are the same images, this time at 219&#215;135 px resolution (click to see the full 730&#215;450 px versions):</p>
<div class="align_left"><a href="http://img.thebroth.com/blog/bird730a.jpg"><img class="content_image" src="http://img.thebroth.com/blog/bird219a.jpg" alt=""/></a><br />
<p class="caption">With tile rotation, 219&#215;135 px <a href="http://img.thebroth.com/blog/bird730a.jpg">[Full size]</a></p>
</div>
<div class="align_left"><a href="http://img.thebroth.com/blog/bird730b.jpg"><img class="content_image" src="http://img.thebroth.com/blog/bird219b.jpg" alt=""/></a><br />
<p class="caption">Original image, 219&#215;135 px <a href="http://img.thebroth.com/blog/bird730b.jpg">[Full size]</a></p>
</div>
<p><br clear="all"/></p>
<p>The images above clearly show the difference. The right one is very jaggy and pixelated. </p>
<blockquote><p>For the mathematically inclined, the observation of &#8220;missing&#8221; rotation in the small thumbnails doesn&#8217;t come as a surprise. Rotating a tile at 45 degrees creates an object that extends the original square area by only 2 pixels at most; less so at wider angles. The tile size is 10 pixels. A thumbnail of 146&#215;90 is exactly 20% in dimension of the original size (730&#215;450), which corresponds to a 10x smaller area. In the thumbnail, each tile is at best reflected as 2&#215;2 pixels, and the tiny 20% extension that the tile may experience at some angles is simply above the sampling frequency and thus won&#8217;t show up in the thumbnail.</p></blockquote>
<p>Many people rate images in the gallery view, before even (or ever) looking at the full size artwork. The question will be, is the absence of rotation in the thumbnails a good thing, does it matter at all, or is it a bad thing?</p>
<p>I look forward to your input!
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.thebroth.com/blog/202/tile-rotation-not-noticeable-in-thumbnails/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Room reseeding</title>
		<link>http://www.thebroth.com/blog/201/room-reseeding</link>
		<comments>http://www.thebroth.com/blog/201/room-reseeding#comments</comments>
		<pubDate>Thu, 08 Feb 2007 11:25:03 +0000</pubDate>
		<dc:creator>markus</dc:creator>
		
	<category>New Features</category>
		<guid isPermaLink="false">http://www.thebroth.com/blog/201/room-reseeding</guid>
		<description><![CDATA[Seeding room colors by uploading an image with the colors you want should be easy, yet many consider it somewhat of a black art. What if you run out of tiles of a certain colors? A new feature makes it easy to reseed the colors of a room, down to very exact tile. 
In the [...]]]></description>
			<content:encoded><![CDATA[<p>Seeding room colors by uploading an image with the colors you want should be easy, yet many consider it somewhat of a black art. What if you run out of tiles of a certain colors? A new feature makes it easy to reseed the colors of a room, down to very exact tile. <a id="more-201"></a></p>
<p>In the past, changing a seeding image in an image application such as Photoshop was at best a hit or miss situation. Well, this has now come to an end. A new feature allows you to recreate a seeding image that has exactly 1000 pixels, with one pixel for each tile.</p>
<div class="align_right content_image"><a href="http://www.thebroth.com/seedingcolors.html?room=members"><img src="http://www.thebroth.com/seedingcolors.html?room=members" alt="" /></a><br />
<p class="caption"><a href="/members">Members</a></p>
</div>
<p>The image that is being created by that new feature is very small, since it takes only 40&#215;25 pixels to represent 1000 pixels. You can now load this image into your favorite image editing software and change the color of any one pixel. Zooming in may help to achieve that.</p>
<p>Simply reseed your room with your adapted tiny seeding image (see how fast it is if you use a small image?), and there we go&#8230; every pixel in this image represents exactly 1 tile.</p>
<p>Don&#8217;t worry about this 40&#215;25 image to be a very distorted version of the image you originally used. The width and height of this image is probably not that same as the original image, but that doesn&#8217;t matter - when seeding, what really happens is this:</p>
<p>The image that you load is firstly resized so it has approximately 1000 pixels, or any value close enough to that. This means that if you&#8217;ve been uploading large image files, you&#8217;ve been doing yourself no favor - it just takes a very long time to upload that image and then to resize it. My tip is: Resize any image that you upload for seeding so that the largest edge is only 60 pixels or less. Yep, that tiny, since the image seeding algorithm is going to discard any extra pixels anyway.</p>
<p>So - upon recreating the seeding image, 40&#215;25 dimensions are enforced. That&#8217;s probably not only the wrong aspect ratio but the image may look terribly distorted or skewed. Once again - this doesn&#8217;t matter. When seeding, TheBroth will look at one pixel after the other, row by row, column by column, and just use each pixel color for one tile color. I hope this makes sense.</p>
<p>So, where&#8217;s that tool? Well for now it is here: <a href="http://www.thebroth.com/seedingcolors.html?room=members">http://www.thebroth.com/seedingcolors.html?room=members</a></p>
<p>Replace &#8220;members&#8221; with your own room name or any other room that you have access to. It&#8217;s not possible to get to the seeding image of password protected rooms.</p>
<p>Now, that&#8217;s not a bad feature, but in addition we also added the ability to upload not only JPG, but also PNG and GIF files. For example, the little image that is being created by this tool is a PNG file. When using this new feature, make sure you save the image in the same PNG format, and not in JPG format - otherwise you may get unexpected results (JPG features a &#8220;lossy&#8221; compression scheme).
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.thebroth.com/blog/201/room-reseeding/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Subscribing to TheBroth&#8217;s RSS feed</title>
		<link>http://www.thebroth.com/blog/200/subscribing-to-thebroths-rss-feed</link>
		<comments>http://www.thebroth.com/blog/200/subscribing-to-thebroths-rss-feed#comments</comments>
		<pubDate>Tue, 06 Feb 2007 07:48:15 +0000</pubDate>
		<dc:creator>markus</dc:creator>
		
	<category>New Features</category>
		<guid isPermaLink="false">http://www.thebroth.com/blog/200/subscribing-to-thebroths-rss-feed</guid>
		<description><![CDATA[Each user can now subscribe to an RSS feed of the latest snapshots, comments to tracked snapshots, comments to subscribed blogs, and comments to your own blog. Read on to learn how.
For those intending to use external software to subscribe to the feed, the URL is
http://www.thebroth.com/feed/notificationsXXXXX.xml (XXXXX corresponds to your user id). On your profile [...]]]></description>
			<content:encoded><![CDATA[<p>Each user can now subscribe to an RSS feed of the latest snapshots, comments to tracked snapshots, comments to subscribed blogs, and comments to your own blog. Read on to learn how.<a id="more-200"></a></p>
<p>For those intending to use external software to subscribe to the feed, the URL is<br />
http://www.thebroth.com/feed/notificationsXXXXX.xml (XXXXX corresponds to your user id). On your profile page, just mouse over the orange RSS icon and copy that URL into your reader. </p>
<h2>Desktop Feed Readers</h2>
<p>Modern browsers such as Firefox 1.5+, IE 7+ and Safari2+ can handle RSS feeds such as TheBroth&#8217;s, but in general <strong>desktop software for feed reading offer a lot more features</strong> such as images, audio/visual notifications, and much more. </p>
<p>Recommended feed reading software for your desktop (all of these are free):</p>
<ul>
<li><a href=" http://feedreader.com/">Feedreader</a> (Windows)</li>
<li><a href="http://www.opencommunity.co.uk/vienna2.php">Vienna</a> (OSX) </li>
<li><a href="http://liferea.sourceforge.net/">Liferea</a> (Linux) </li>
</ul>
<p>If you know of any other good feed reading software or can think of anything else that should be included in the feed, please mention it in the forum.</p>
<p><strong>Important:</strong> Please don&#8217;t set your feed reader to check for updates at an interval any shorter than 5 minutes. Doing so will not be of any benefit as the feed data are currently cached with a lifetime of 5 minutes.</p>
<h2>Subscribing to the feed using your browser</h2>
<h3>To subscribe to the feed using Firefox 1.5+</h3>
<p>Visit your <a href="http://www.thebroth.com/profile.html">profile page</a>. A &#8216;feed&#8217; logo should appear in your browser&#8217;s address bar (it&#8217;s the little orange logo): </p>
<p><img class="content_image" src="http://img.thebroth.com/firefoxrss.jpg" alt="feed icon in firefox" /></p>
<p>Click on the orange icon and click on the &#8216;Subscribe Now&#8217; button that appears on the next page.</p>
<p>A dialog box asking you to &#8216;Add live bookmark&#8217; will appear.</p>
<p>Click &#8216;add&#8217; or &#8216;ok&#8217; (the actual text can depend on what OS you&#8217;re using).</p>
<p>A new entry should appear on the bookmarks toolbar folder:</p>
<p><img class="content_image"  src="http://img.thebroth.com/livebookmark.png" alt="add a live bookmark firefox" /></p>
<p>You can click on this to see the feed content.</p>
<h3>To subscribe to the feed using IE7+</h3>
<p>Visit your <a href="http://www.thebroth.com/profile.html">profile page</a>. A &#8216;feed&#8217; logo should appear below your browser&#8217;s address bar (it&#8217;s the little orange logo): </p>
<p><img class="content_image"  src="http://img.thebroth.com/ie7rss.png" alt="feed icon in IE7" /></p>
<p>Click on the orange icon and click on the &#8216;Subscribe to this feed&#8217; link that appears near the top of the next page. </p>
<p>Click &#8216;Subscribe&#8217; on the dialog box that appears.</p>
<p>To view the feeds that IE7 is subscribed to, press CTL+SHIFT+J. </p>
<h3>To subscribe to the feed using Safari 2+</h3>
<p>Visit your <a href="http://www.thebroth.com/profile.html">profile page</a>. A &#8216;feed&#8217; logo should appear in your browser&#8217;s address bar (it&#8217;s the blue &#8216;RSS&#8217; logo):</p>
<p><img class="content_image"  src="http://img.thebroth.com/safari_rss.png" alt="feed icon in Safari" /></p>
<p>Click on the &#8216;RSS&#8217; icon to view the feed, and then click on the &#8216;Add Bookmark&hellip;&#8217; link that appears in the sidebar.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.thebroth.com/blog/200/subscribing-to-thebroths-rss-feed/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Comment notifications via email</title>
		<link>http://www.thebroth.com/blog/199/comment-notifications-via-email</link>
		<comments>http://www.thebroth.com/blog/199/comment-notifications-via-email#comments</comments>
		<pubDate>Fri, 02 Feb 2007 08:24:51 +0000</pubDate>
		<dc:creator>markus</dc:creator>
		
	<category>New Features</category>
		<guid isPermaLink="false">http://www.thebroth.com/blog/199/comment-notifications-via-email</guid>
		<description><![CDATA[New feature: You can now opt to be notified via email whenever somebody makes a new comment to a blog post of yours. 
Until now, there was no easy way to keep track of comments to your blog posts, because you can&#8217;t easily see an overview of all your posts that shows which posts have [...]]]></description>
			<content:encoded><![CDATA[<p>New feature: You can now opt to be notified via email whenever somebody makes a new comment to a blog post of yours. <a id="more-199"></a></p>
<p>Until now, there was no easy way to keep track of comments to your blog posts, because you can&#8217;t easily see an overview of all your posts that shows which posts have new comments that you haven&#8217;t seen yet. Maybe we&#8217;ll have a feature like this one day - the main problem with it is that it doesn&#8217;t scale well if you have a LOT of blog entries.</p>
<p>So, we&#8217;re now offering an email notification service. When you go to your own blog pages, you&#8217;ll find a checkbox on the right hand side, labeled &#8220;Email me comment alerts&#8221;. If you switch that on, you&#8217;ll get an email sent immediately. It will contain a short message and a direct link to the blogpost with the new comment. Naturally you can use that link to switch off that feature if you&#8217;re just getting too many of these notifications.</p>
<p>We also plan to offer a whole number of other email notification services, for example, when there are new comments to any of the snapshots you&#8217;re tracking, or when there is a new comment to any blog that you&#8217;ve subscribed to, or possibly whenever a new artwork has been placed in the public gallery.</p>
<p>Rest assured, these are all optional services, and by default they are OFF. You will have to actually opt in and tick the checkbox for the corresponding service before we inundate your email inbox with all these notifications. :-)</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.thebroth.com/blog/199/comment-notifications-via-email/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
