<?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>breakthesystem &#187; English</title>
	<atom:link href="http://breakthesystem.org/category/english/feed/" rel="self" type="application/rss+xml" />
	<link>http://breakthesystem.org</link>
	<description>Elegante Anwendungen für Web, iPhone und Mac</description>
	<lastBuildDate>Wed, 12 May 2010 14:01:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Introducing django-thumbnail.py</title>
		<link>http://breakthesystem.org/2009/introducing-django-thumbnail-py/</link>
		<comments>http://breakthesystem.org/2009/introducing-django-thumbnail-py/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 22:05:26 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://breakthesystem.org/?p=439</guid>
		<description><![CDATA[Almost all of our Django projects employ some kind of thumbnail creation mechanism. 
Initially, the thumbnails we needed were just the easy kind: Either scaled down versions of the initial image, or cropped to a square and then scaled down. Those are easily created in a few lines of Python, and I had created a [...]]]></description>
			<content:encoded><![CDATA[<p>Almost all of our <a href="http://djangoproject.com">Django</a> projects employ some kind of thumbnail creation mechanism. <span id="more-439"></span></p>
<p>Initially, the thumbnails we needed were just the easy kind: Either scaled down versions of the initial image, or cropped to a square and then scaled down. <a href="http://stackoverflow.com/questions/709388/whats-a-more-elegant-rephrasing-of-this-cropping-algorithm-in-python">Those are easily created in a few lines of Python</a>, and I had created a custom Django template tag to create them. Pretty soon, caching became important, too, and I added that as well.</p>
<p>For our most recent projects, the design necessitated thumbnails that had exactly specified dimensions. Here are some examples:</p>
<p><img style="margin: 20px 0" src="http://breakthesystem.org/wp-content/uploads/2009/11/examples.png" alt="examples" title="examples" width="521" height="246" class="aligncenter size-full wp-image-444" /></p>
<p>The code to create these kinds of thumbnails is a little trickier. Since I found no preexisting solution, I decided to roll my own, and now we&#8217;re sharing that solution with the world. I&#8217;ll talk a little about the algorithm first, if you just want the code, <a href="http://bitbucket.org/winsmith/django-thumbnail/downloads/">you can grab it right now on the Bitbucket page</a>.</p>
<p>Also, if you aren&#8217;t interested in the technical details, you can skip the technical part and go directly to <a href="#how_to_use">the part where we explain how to use this stuff</a>.</p>
<h2>The Technical Part™</h2>
<p>So, how do we create an image that fits the correct dimensions, while still ensuring that as much as possible of the content of the original image fits?<br />
<img style="margin: 20px 0"  src="http://breakthesystem.org/wp-content/uploads/2009/11/1.png" alt="1" title="1" width="521" height="247" class="aligncenter size-full wp-image-440" /></p>
<p>First I tried comparing the individual sides of the image to those of the thumbnail, but that obviously resulted in nothing but lots and lots of edge cases: How do I have to scale the image if its width is slightly greater than the thumbnail&#8217;s but it&#8217;s a lot higher? What if it&#8217;s the other way round? What if the image is a rectangle and the thumbnail is a square?</p>
<p>The only comparable attribute of the image and thumbnail sizes is their ratio, obtained by dividing their width by their height. The ratio stays the same regardless of the actual width or height and is therefore ideal for determining exactly which part of the original image to crop. The cropped image can then be resized to obtain a thumbnail with exactly the desired dimensions.<br />
<img style="margin: 20px 0"  src="http://breakthesystem.org/wp-content/uploads/2009/11/21.png" alt="2" title="2" width="521" height="158" class="aligncenter size-full wp-image-441" /></p>
<p>If the thumbnail ratio is <em>greater</em> than the image ratio, the thumbnail is <em>wider</em> than the original image, and we keep the image&#8217;s <em>width</em> while cropping top and bottom.</p>
<p>If the thumbnail ratio is <em>less</em> than the image ratio, the thumbnail is <em>taller</em> than the original image, and keep the image&#8217;s <em>height</em> while cropping the sides.</p>
<p>(After cropping, we obviously resize the image to the exact thumbnail dimensions.)</p>
<p><img style="margin: 20px 0" src="http://breakthesystem.org/wp-content/uploads/2009/11/3.png" alt="3" title="3" width="521" height="229" class="aligncenter size-full wp-image-442" /></p>
<p>The code for this is as follows (<code>image</code> is the original image, <code>image.size[0]</code> is the original image&#8217;s x size, <code>x</code> and <code>y</code> are the thumbnails dimensions):</p>
<pre class="textmate-source mac_classic"><span class='linenum'>    1</span> <span class="source source_python">img_ratio <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_function-call meta_function-call_python"><span class="support support_type support_type_python">float</span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">(</span><span class="meta meta_function-call meta_function-call_arguments meta_function-call_arguments_python"><span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">0</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">)</span></span> <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">/</span> <span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">1</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span>
<span class='linenum'>    2</span> thumb_ratio <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_function-call meta_function-call_python"><span class="support support_type support_type_python">float</span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">(</span><span class="meta meta_function-call meta_function-call_arguments meta_function-call_arguments_python">x</span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">)</span></span> <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">/</span> y
<span class='linenum'>    3</span> x <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_function-call meta_function-call_python"><span class="support support_type support_type_python">int</span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">(</span><span class="meta meta_function-call meta_function-call_arguments meta_function-call_arguments_python">x</span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">)</span></span>; y <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_function-call meta_function-call_python"><span class="support support_type support_type_python">int</span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">(</span><span class="meta meta_function-call meta_function-call_arguments meta_function-call_arguments_python">y</span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">)</span></span>
<span class='linenum'>    4</span>
<span class='linenum'>    5</span> <span class="keyword keyword_control keyword_control_flow keyword_control_flow_python">if</span>(img_ratio <span class="keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_python">&gt;</span> thumb_ratio):
<span class='linenum'>    6</span>     c_width <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> x <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">*</span> <span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">1</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">/</span> y
<span class='linenum'>    7</span>     c_height <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">1</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span>
<span class='linenum'>    8</span>     originX <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">0</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">/</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span> <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">-</span> c_width <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">/</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span>
<span class='linenum'>    9</span>     originY <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">0</span>
<span class='linenum'>   10</span> <span class="keyword keyword_control keyword_control_flow keyword_control_flow_python">else</span>:
<span class='linenum'>   11</span>     c_width <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">0</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span>
<span class='linenum'>   12</span>     c_height <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> y <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">*</span> <span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">0</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">/</span> x
<span class='linenum'>   13</span>     originX <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">0</span>
<span class='linenum'>   14</span>     originY <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">1</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">/</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span> <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">-</span> c_height <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">/</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span>
<span class='linenum'>   15</span>
<span class='linenum'>   16</span> cropBox <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> (originX, originY, originX <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">+</span> c_width, originY <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">+</span> c_height)
<span class='linenum'>   17</span> image <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_function-call meta_function-call_python">image.crop<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">(</span><span class="meta meta_function-call meta_function-call_arguments meta_function-call_arguments_python">cropBox</span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">)</span></span>
<span class='linenum'>   18</span> <span class="meta meta_function-call meta_function-call_python">image.thumbnail<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">(</span><span class="meta meta_function-call meta_function-call_arguments meta_function-call_arguments_python"><span class="meta meta_structure meta_structure_list meta_structure_list_python"><span class="punctuation punctuation_definition punctuation_definition_list punctuation_definition_list_begin punctuation_definition_list_begin_python">[</span><span class="meta meta_structure meta_structure_list meta_structure_list_item meta_structure_list_item_python">x</span><span class="punctuation punctuation_separator punctuation_separator_list punctuation_separator_list_python">,</span> <span class="meta meta_structure meta_structure_list meta_structure_list_item meta_structure_list_item_python">y</span><span class="punctuation punctuation_definition punctuation_definition_list punctuation_definition_list_end punctuation_definition_list_end_python">]</span></span>, Image.ANTIALIAS</span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">)</span></span></span></pre>
<p>Some comments:</p>
<ul>
<li>In the first two lines, we determine the image&#8217;s ratio and that of the thumbnail.</li>
<li>Then we determine, according to the ratio, how wide the thumbnail would be, if it were as high as the image. (For image ratio > thumbnail ratio. Swap width and height for the other way round.)</li>
<li>We create a tuple called <code>cropBox</code>, (line 16) which we fill with the coordinates of four corners of an imaginary box that covers as many of the image&#8217;s pixels as possible while retaining the desired ratio of the thumbnail.</li>
<li>We crop the image based on the <code>cropbox</code> in line 17.</li>
<li>Finally, in line 18, we resize the image, which now has the correct ratio, to the correct size as well, thereby creating the thumbnail.</li>
</ul>
<p>We have some edges cases as well. An easy one is the ratio of the thumbnail being the same as the original image. In this case, the <code>else</code> statement in line 10 is executed, but it could just as well be the the <code>if</code>. Either way, the dimension that is calculated as a product of ratio and the other dimension will be correct.</p>
<p><img style="margin:20px;float:right" src="http://breakthesystem.org/wp-content/uploads/2009/11/4.png" alt="4" title="4" width="147" height="145" class="alignnone size-full wp-image-443" />Another edge case appears if one or both sides of the original image are smaller than the respective side or sides of the thumbnail. In this case, we use the length of the original image&#8217;s side length instead of the length as calculated by the ratio. </p>
<p>This creates images that might in fact be smaller than the desired dimensions, instead of scaling the image somehow to fit. We decided this would be better in most cases, since images that are enlarged usually appear blocky or mangled.</p>
<p>So we just cut the size off:</p>
<pre class="textmate-source mac_classic"><span class='linenum'>    1</span> <span class="source source_python"><span class="keyword keyword_control keyword_control_flow keyword_control_flow_python">if</span> (<span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">0</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_python">&lt;</span> x):
<span class='linenum'>    2</span>     x <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">0</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span>
<span class='linenum'>    3</span> <span class="keyword keyword_control keyword_control_flow keyword_control_flow_python">if</span> (<span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">1</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_python">&lt;</span> y):
<span class='linenum'>    4</span>     y <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_item-access meta_item-access_python">image.size<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">1</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span></span></pre>
<p>As for file saving and caching, we create a file name based on the original file&#8217;s name plus the dimensions, like <code>image-640x480.png</code>. If such a file already exists and its timestamp is newer than the original files (meaning the original has not been replaced by another version) we skip all the time consuming computations and simply return the existing image.</p>
<p>That&#8217;s all the code-explaining I will do today. For more, <a href="http://bitbucket.org/winsmith/django-thumbnail/issues/new/">ask a question on Bitbucket</a> or <a href="http://bitbucket.org/winsmith/django-thumbnail/src/">read the source code yourself</a>.</p>
<p><a name="how_to_use"><br />
<h2>The Part Where I Explain How To Use This Stuff™</h2>
<p></a></p>
<p>Of course you can simply  use the described algorithm to create your own image thumbnail template tag if you want. Or you can use it in your Python application without using Django. Or you can port it to C. Whatever.</p>
<p>Oh, by the way, you can use all the code in this blog entry and in the <a href="http://bitbucket.org/winsmith/django-thumbnail/src/">django-thumbnail code repository</a> for free, regardless of wether you make money with it or not. No, you don&#8217;t have to make your code open to the general public or to us. You <em>can</em> think of breakthesystem when you need a serious website, a cool iPhone app or an awesome Mac application, though. Or you can buy me a beer. Just <a href="mailto:daniel@breakthesystem.org">contact me</a> for any of that.</p>
<p>And <a href="http://twitter.com/breakthesystem">you should follow me on Twitter</a>, obviously. :)</p>
<p>Okay, let&#8217;s go. I&#8217;m assuming you&#8217;ll have a model in your Django application that looks a bit like this, by the way:</p>
<pre class="textmate-source mac_classic"><span class="source source_python"><span class="meta meta_class meta_class_python"><span class="storage storage_type storage_type_class storage_type_class_python">class</span> <span class="entity entity_name entity_name_type entity_name_type_class entity_name_type_class_python">Picture</span><span class="punctuation punctuation_definition punctuation_definition_inheritance punctuation_definition_inheritance_begin punctuation_definition_inheritance_begin_python">(</span><span class="meta meta_class meta_class_inheritance meta_class_inheritance_python"><span class="entity entity_other entity_other_inherited-class entity_other_inherited-class_python">models.Model</span></span><span class="punctuation punctuation_definition punctuation_definition_inheritance punctuation_definition_inheritance_end punctuation_definition_inheritance_end_python">)</span><span class="punctuation punctuation_section punctuation_section_class punctuation_section_class_begin punctuation_section_class_begin_python">:</span></span>
    title <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_function-call meta_function-call_python">models.CharField<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">(</span><span class="meta meta_function-call meta_function-call_arguments meta_function-call_arguments_python"><span class="variable variable_parameter variable_parameter_function variable_parameter_function_python">max_length</span><span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">255</span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">)</span></span>
    image <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="meta meta_function-call meta_function-call_python">models.ImageField<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">(</span><span class="meta meta_function-call meta_function-call_arguments meta_function-call_arguments_python"><span class="variable variable_parameter variable_parameter_function variable_parameter_function_python">upload_to</span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="string string_quoted string_quoted_double string_quoted_double_single-line string_quoted_double_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">"</span>images/<span class="constant constant_other constant_other_placeholder constant_other_placeholder_python">%Y</span>-<span class="constant constant_other constant_other_placeholder constant_other_placeholder_python">%m</span>-<span class="constant constant_other constant_other_placeholder constant_other_placeholder_python">%d</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">"</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">)</span></span></span></pre>
<p>First, install the template tag. To do that , download the file <a href="http://bitbucket.org/winsmith/django-thumbnail/raw/tip/thumbnail.py">thumbnail.py</a> and place it in <code>YourDjangoProject/your_django_app/templatetags/tumbnail.py</code>. You&#8217;ll probably have to create the <code>templatetags</code> folder. If you&#8217;ve just created it, you&#8217;ll also have to create an empty file called <code>__init__.py</code> in the <code>templatetags</code> folder. </p>
<p>In your template, add the statement <code>{% load thumbnail %}</code> somewhere before you actually use the <code>thumbnail</code> tag. You&#8217;ll need that statement only once, so I recommend placing it at the very top of your template. Then use the tag like this:</p>
<pre class="textmate-source mac_classic"><span class="text text_html text_html_basic"><span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">a</span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html">href</span>=<span class="string string_quoted string_quoted_double string_quoted_double_html"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html">"</span>{{ picture.image.get_url }}<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html">"</span></span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span>
    {{ picture.image|thumbnail:320x240 }}
<span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">a</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span></span></pre>
<p>This will create a thumbnail of 320 by 240 pixels that links to the original picture.</p>
<p>You can also do this: </p>
<pre class="textmate-source mac_classic"><span class="text text_html text_html_basic"><span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">a</span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html">href</span>=<span class="string string_quoted string_quoted_double string_quoted_double_html"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html">"</span>{{ picture.image.get_url }}<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html">"</span></span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span>
    {{ picture.image|thumbnail:320x0 }}
<span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">a</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span></span></pre>
<p>The above code will create a thumbnail that is 320 pixels wide. In other words, this is the image scaled down to a width of 320px. You can also use something like <code>thumbnail:0x240</code> for a variable width and fixed height.</p>
<p>Finally, thumbnail.py can do one more trick:</p>
<pre class="textmate-source mac_classic"><span class="text text_html text_html_basic"><span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">a</span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html">href</span>=<span class="string string_quoted string_quoted_double string_quoted_double_html"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html">"</span>{{ picture.image.get_url }}<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html">"</span></span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span>
    {{ picture.image|thumbnail_with_max_side:320 }}
<span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">a</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span></span></pre>
<p>The above code will create a scaled down version of the image that is 320 pixels on the longer side, whichever one that is.</p>
<p>And that&#8217;s it. I hope you like it. <a href="http://bitbucket.org/winsmith/django-thumbnail/">You should now go to django-thumbnail&#8217;s Bitbucket homepage</a> and have a look at the current source code, or comment, or follow the project. I probably won&#8217;t update this blog entry for new developments regarding django-thumbnail, so Bitbucket is where you should go.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://breakthesystem.org/2009/introducing-django-thumbnail-py/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to install Django on Mac OS X 10.6 Snow Leopard</title>
		<link>http://breakthesystem.org/2009/django-on-snow-leopard/</link>
		<comments>http://breakthesystem.org/2009/django-on-snow-leopard/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 13:09:02 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Featured]]></category>

		<guid isPermaLink="false">http://breakthesystem.org/?p=377</guid>
		<description><![CDATA[So you got your brand spanking new Snow Leopard installed and now you want to do some Django development work on it, huh? Well, you&#8217;re in luck, because I&#8217;ve compiled this little tutorial for you. 
This blog post is partly based on Rob Hudson&#8217;s Installing Django on Leopard post, which has helped me a lot [...]]]></description>
			<content:encoded><![CDATA[<p>So you got your brand spanking new Snow Leopard installed and now you want to do some Django development work on it, huh? Well, you&#8217;re in luck, because I&#8217;ve compiled this little tutorial for you. <span id="more-377"></span></p>
<p>This blog post is partly based on Rob Hudson&#8217;s <a href="http://rob.cogit8.org/blog/2007/Nov/14/installing-django-leopard-mac-os-105/">Installing Django on Leopard</a> post, which has helped me a lot in the past. Thanks, Rob!</p>
<p>Also, if you need help installing other tools on your machine, Dan Benjamin of hivelogic.com has created tutorials for installing <a href="http://hivelogic.com/articles/compiling-mysql-on-snow-leopard/">MySQL</a>, <a href="http://hivelogic.com/articles/compiling-git-on-snow-leopard/">Git</a> and <a href="http://hivelogic.com/articles/compiling-mercurial-on-snow-leopard/">Mercurial</a>.<br />
<br/></p>
<h2>Prerequisites</h2>
<p>Luckily, Snow Leopard brings everything with it that you need: Subversion and Python 2.6 are already pre-installed with the new OSX. This is especially important because as of now, 3 days after the release of OS X 10.6, there is no working version of <a href="http://www.macports.org/">Macports</a> yet, which might otherwise help you install lots of command-line-tools for your mac.<br />
<br/></p>
<h2>Downloading Django</h2>
<p>First, open your Terminal.app. It should be in the Utilities folder, located inside the Applications folder.</p>
<p>To download Django 1.1 using Subversion, first <code>cd</code> into the Python site-packages directory by pasting the following line into the terminal window and pressing enter:</p>
<p><strike>
<pre>cd /usr/local/lib/python2.6/site-packages</pre>
<p></strike></p>
<p>A few commentators rightfully point out that the correct path to the site-packages should be:</p>
<pre>cd /Library/Python/2.6/site-packages/</pre>
<p>And then download Django into the site packages directory using Subversion:</p>
<pre>sudo svn co http://code.djangoproject.com/svn/django/tags/releases/1.1/django</pre>
<p><br/></p>
<h2>Installing Django</h2>
<p>Now Python should know about Django itself. You&#8217;ll only have to tell your system about the <code>django-admin.py</code> so that you can create new projects. To do this, create a symlink:</p>
<pre>sudo ln -s /Library/Python/2.6/site-packages/django/bin/django-admin.py /usr/bin/django-admin.py</pre>
<p><br/></p>
<h2>Cleaning Up</h2>
<p>On American Macs, this should already be enough. On many other system, you&#8217;ll need one more thing to avoid the dreaded <a href="http://www.google.com/search?q=ValueError:+unknown+locale:+UTF-8">unknown locale: UTF-8</a> error. </p>
<p>We simple need to set two environment variables to tell your system about your input language. In your terminal, type</p>
<pre>nano ~/.profile</pre>
<p>which will open your profile file. If there is already something in the file, ignore it. Add these two lines:</p>
<pre>export LC_ALL=de_DE.UTF-8
export LANG=de_DE.UTF-8</pre>
<p>As you can see, the locale is now <code>de_DE.UTF-8</code> which is the correct entry for me, as I live in Germany. For other countries, substitute &#8220;de_DE&#8221; by the correct code as taken from <a href="http://www.elxis.org/guides/developers-guides/elxis-languages-locales-list.html">this list of locales</a>. </p>
<p>Save the file by pressing <code>Ctrl+x</code>, then <code>y</code>. Finally, close your terminal and take a deep breath. You have just installed Django on Snow Leopard. Happy coding.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://breakthesystem.org/2009/django-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Code Snippets. When, How and Why?</title>
		<link>http://breakthesystem.org/2009/code-snippets-when-how-and-why/</link>
		<comments>http://breakthesystem.org/2009/code-snippets-when-how-and-why/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 11:19:22 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://breakthesystem.org/?p=61</guid>
		<description><![CDATA[So I was reading an article called <a href="http://www.noupe.com/tools/readers-pick-30-incredibly-useful-mac-apps-for-web-design.html">30+ Incredibly Useful Mac Apps for Web Design</a> and while I found most of the apps useful, I stumbled over a link to an Application called <a href="http://www.mcubedsw.com/software/codecollectorpro">Code Collector Pro</a>.  Huh?]]></description>
			<content:encoded><![CDATA[<p>So I was reading an article called <a href="http://www.noupe.com/tools/readers-pick-30-incredibly-useful-mac-apps-for-web-design.html">30+ Incredibly Useful Mac Apps for Web Design</a> and while I found most of the apps useful, I stumbled over a link to an Application called <a href="http://www.mcubedsw.com/software/codecollectorpro">Code Collector Pro</a>. </p>
<h1>Huh?</h1>
<p>In recent weeks, I&#8217;ve stumbled over so many Tools for managing code snippets, it&#8217;s not funny any more. Viusual Studio plugins, TextMate plugins, apps for Windows, apps for OSX, apps for the web&#8230; what&#8217;s the matter? Why is everybody suddenly horny for little snippets of code?</p>
<p>I&#8217;ve thought about trying out a code snippet application, but&#8230; I wouldn&#8217;t really know what to do with one. I have no fucking clue, really! Yes, of course, you&#8217;re supposed to enter little snippets of code that you think could be useful in the future, but I somehow have never come accross these.</p>
<h1>I don&#8217;t really need snippets, do I?</h1>
<p>Of course, I have code on my hard drive that I will definitely reuse. For example, I have a folder called <code>CSS</code> with CSS files to <a href="960.gs">reset font and spacing settings and set grid systems</a>. I also have a folder with an almost-finished CMS that will most certainly be included in more than one web-app of mine.</p>
<p><em>But that doesn&#8217;t really merit a whole App. So I don&#8217;t use one.</em> And this is okay by me, or at least I think so. </p>
<h1>But what if I&#8217;m missing out on something really cool?</h1>
<p>What if there are indeed cool things to be said about Schnippets, and I just haven&#8217;t realized them? That would suck. <em>Are you using a code snippet app?</em> If so, what for? I&#8217;m looking forward to your ideas.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://breakthesystem.org/2009/code-snippets-when-how-and-why/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>We&#8217;re moving!</title>
		<link>http://breakthesystem.org/2008/were-moving/</link>
		<comments>http://breakthesystem.org/2008/were-moving/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 19:52:24 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://breakthesystem.org/?p=59</guid>
		<description><![CDATA[I&#8217;m going to move the blog to blog.breakthesystem.org soon. This is the first of a series of changes to establish breakthesystem.org as a company for my future software development endeavors.
Stay tuned! I&#8217;ll be back.
 ]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to move the blog to blog.breakthesystem.org soon. This is the first of a series of changes to establish breakthesystem.org as a company for my future software development endeavors.</p>
<p>Stay tuned! I&#8217;ll be back.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://breakthesystem.org/2008/were-moving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Type</title>
		<link>http://breakthesystem.org/2008/some-type/</link>
		<comments>http://breakthesystem.org/2008/some-type/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 18:46:08 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[showroom]]></category>

		<guid isPermaLink="false">http://breakthesystem.org/?p=57</guid>
		<description><![CDATA[Große Version
 ]]></description>
			<content:encoded><![CDATA[<p><a href='http://breakthesystem.org/wp-content/uploads/2008/10/break-it-like-its-hot.jpg'>Große Version</a></p>
 ]]></content:encoded>
			<wfw:commentRss>http://breakthesystem.org/2008/some-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacBook Pro Problems With Radeon Drivers</title>
		<link>http://breakthesystem.org/2008/macbook-pro-problems-with-radeon-drivers/</link>
		<comments>http://breakthesystem.org/2008/macbook-pro-problems-with-radeon-drivers/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 14:33:31 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://breakthesystem.org/?p=56</guid>
		<description><![CDATA[I finally managed to solve my problems with the Windows Radeon Drivers on my MacBook Pro. When in Boot Camp, I was never able to set the resolution of my external monitor right, even though it worked in OS X.
I first tried to install the Radeon Omage Drivers from here, which helped a little, but [...]]]></description>
			<content:encoded><![CDATA[<p>I finally managed to solve my problems with the Windows Radeon Drivers on my MacBook Pro. When in Boot Camp, I was never able to set the resolution of my external monitor right, even though it worked in OS X.</p>
<p>I first tried to install the Radeon Omage Drivers from <a href="http://www.driverheavendownloads.net/omegadrive.htm">here</a>, which helped a little, but still didn&#8217;t really work right: I was able to set some resolutions, but not all, and especially not 1680&#215;1050, my external monitor&#8217;s native resolution. </p>
<p>The solution for that is simple: In Display Properties | Settings | Advanced | Displays, un-check the checkbox marked &#8220;Preserve Wide Aspect Ratio on attached displays.&#8221; Then it just works.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://breakthesystem.org/2008/macbook-pro-problems-with-radeon-drivers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Solving all your MacPorts problems</title>
		<link>http://breakthesystem.org/2008/solving-all-your-macports-problems/</link>
		<comments>http://breakthesystem.org/2008/solving-all-your-macports-problems/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 11:45:25 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://breakthesystem.org/?p=53</guid>
		<description><![CDATA[I just found the reason behind a bug in MacPorts that has been annoying the hell out of me the last few months: Sometimes, when installing new ports, the installation will die at the compilation stage with an error similar to this:
-DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -I/opt/local/include -I/opt/local/include/python2.5 -c _tkinter.c -o build/temp.macosx-10.3-i386-2.5/_tkinter.o
unable to execute [...]]]></description>
			<content:encoded><![CDATA[<p>I just found the reason behind a bug in <a href="http://trac.macosforge.org/projects/macports/">MacPorts</a> that has been annoying the hell out of me the last few months: Sometimes, when installing new ports, the installation will die at the compilation stage with an error similar to this:<span id="more-53"></span></p>
<pre>-DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -I/opt/local/include -I/opt/local/include/python2.5 -c _tkinter.c -o build/temp.macosx-10.3-i386-2.5/_tkinter.o
unable to execute -DNDEBUG: No such file or directory
error: command '-DNDEBUG' failed with exit status 1</pre>
<p>Seems like the port doesn&#8217;t call <code>gcc [args]</code> to compile the binary, but only the [args], which often start with <code>-DNDEBUG</code>. (which, incidentally, is hard to google for, because of the minus sign.)</p>
<p>afb@macports.org has the reason for this:</p>
<blockquote><p>It seems that those python ports are expecting $CC to be set in build as well as in configure, and fall back to random values such as &#8220;&#8221; or &#8220;cc&#8221; or &#8220;/usr/bin/gcc-4.0&#8243; when it isn&#8217;t. This probably also explains why rerunning the build sometimes succeeds, if something else was adding a $CC to the environment that can be picked up as a lucky guess second time.</p></blockquote>
<p>A workaround is setting the <code>build.enc</code> environment variable like so:</p>
<pre>sudo su
password:
set build.env="CC=gcc"
</pre>
<p>and then run port. <a href="http://trac.macosforge.org/projects/macports/ticket/13930">Here&#8217;s the ticket for more info.</a></p>
 ]]></content:encoded>
			<wfw:commentRss>http://breakthesystem.org/2008/solving-all-your-macports-problems/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Moderate Site Update</title>
		<link>http://breakthesystem.org/2008/moderate-site-update/</link>
		<comments>http://breakthesystem.org/2008/moderate-site-update/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 08:01:31 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://breakthesystem.org/?p=49</guid>
		<description><![CDATA[Updated to Wordpress 2.5, which looks quite awesome. Also updated the look of the page a little, with my Twitter updates and a tag cloud.
And, before you laugh&#8230; yes, I kinda get Twitter now. And I like it. 
PS: I couldn&#8217;t find a better picture for this post, so I used my new favourite image.
Bild [...]]]></description>
			<content:encoded><![CDATA[<p>Updated to Wordpress 2.5, which looks quite awesome. Also updated the look of the page a little, with my <a href="http://twitter.com/breakthesystem">Twitter</a> updates and a tag cloud.</p>
<p>And, before you laugh&#8230; yes, I kinda get Twitter now. And I like it. </p>
<p>PS: I couldn&#8217;t find a better picture for this post, so I used my <a href="http://www.theregister.co.uk/2008/03/30/german_interior_minister_fingerprint_appropriated/">new favourite image.</a></p>
<p>Bild von <a href="http://flickr.com/photos/felipearte/47231113/sizes/o/">FelipeArte</a></p>
 ]]></content:encoded>
			<wfw:commentRss>http://breakthesystem.org/2008/moderate-site-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reznor&#8230; reznoring.</title>
		<link>http://breakthesystem.org/2008/reznor-reznoring/</link>
		<comments>http://breakthesystem.org/2008/reznor-reznoring/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 12:56:09 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[reznor]]></category>

		<guid isPermaLink="false">http://breakthesystem.org/2008/reznor-reznoring/</guid>
		<description><![CDATA[Finally! New Nine Inch Nails album available&#8230; under a Creative Commons Licence!
You can either 

download the first 9 tracks for free from the NIN site
download all for free from the Bittorrent site of your choice ;)
pay $5 and download the full album (and support the artist)
pay $10 and get the download plus a 2-disc digipak
pay [...]]]></description>
			<content:encoded><![CDATA[<p>Finally! <a href="http://ghosts.nin.com">New Nine Inch Nails album available&#8230; under a Creative Commons Licence</a>!<span id="more-47"></span></p>
<p>You can either </p>
<ul>
<li>download the first 9 tracks for free from the NIN site</li>
<li>download all for free from the Bittorrent site of your choice ;)</li>
<li>pay $5 and download the full album (and support the artist)</li>
<li>pay $10 and get the download plus a 2-disc digipak</li>
<li>pay $75 or $300 for deluxe packages respectively</li>
</li>
<p>I bought the $10 version. You can pay via Paypal, which is very convenient and right now I&#8217;m eagerly awaiting my download link. And with the ridiculously low dollar, its just a little more than a normal store-bought album even <b>with</b> shipping and taxes.</p>
<p>I&#8217;ll post what I think of the music once I&#8217;ve listened to the album a few times. (Yes, I am one of those old-fashioned people who listen to music before reviewing it ;) )</p>
 ]]></content:encoded>
			<wfw:commentRss>http://breakthesystem.org/2008/reznor-reznoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Europeans: I want YOU to sign this petition</title>
		<link>http://breakthesystem.org/2008/europeans-i-want-you-to-sign-this-petition/</link>
		<comments>http://breakthesystem.org/2008/europeans-i-want-you-to-sign-this-petition/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 12:43:07 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[content mafia]]></category>
		<category><![CDATA[copyright]]></category>

		<guid isPermaLink="false">http://breakthesystem.org/2008/europeans-i-want-you-to-sign-this-petition/</guid>
		<description><![CDATA[So the content mafia is going to push for an extension of the current copyright term of 50 years. In my book, fifty years is more than enough. In yours too? Sign the petition!

Copyright is a bargain. In exchange for their investment in creating and distributing sound recordings to the public, copyright holders are granted [...]]]></description>
			<content:encoded><![CDATA[<p>So the content mafia is going to push for an extension of the current copyright term of 50 years. In my book, fifty years is more than enough. In yours too? <a href="http://www.soundcopyright.eu/petition">Sign the petition</a>!<br />
<span id="more-46"></span></p>
<blockquote><p>Copyright is a bargain. In exchange for their investment in creating and distributing sound recordings to the public, copyright holders are granted a limited monopoly during which are allowed to control the use of those recordings. This includes the right to pursue anyone who uses their recordings without permission. But when this time is up, these works join Goethe, Hugo and Shakespeare in the proper place for all human culture – the public domain. In practice, because of repeated term extensions and the relatively short time in which sound recording techniques have been available, there are no public domain sound recordings.</p></blockquote>
<p><a href="http://www.soundcopyright.eu/">Full text at soundcopyright.eu</a></p>
 ]]></content:encoded>
			<wfw:commentRss>http://breakthesystem.org/2008/europeans-i-want-you-to-sign-this-petition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
