<?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>CodeDread Blog &#187; Software</title>
	<atom:link href="http://www.codedread.com/blog/archives/category/technology/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codedread.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 02 Jan 2012 15:30:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Binary Tools for JavaScript</title>
		<link>http://www.codedread.com/blog/archives/2011/09/19/binary-tools-for-javascript/</link>
		<comments>http://www.codedread.com/blog/archives/2011/09/19/binary-tools-for-javascript/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 05:23:45 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=1026</guid>
		<description><![CDATA[As promised, I have a tiny thing to announce here. I recently split off and refactored the code that deals binary data in kthoom into a new open source project: http://bitjs.googlecode.com/, Binary Tools for JavaScript. The faster and faster JavaScript engines in modern browsers and the rise of new technologies like Typed Arrays, Web Workers, [...]]]></description>
			<content:encoded><![CDATA[<p><img xmlns="http://www.w3.org/1999/xhtml" width="100" height="100" style="float:right" src="http://codedread.com/clipart/tools.svgz" alt="I want to believe. SVG as an image format." />As promised, I have a tiny thing to announce here.  I recently split off and refactored the code that deals binary data in <a href="http://kthoom.googlecode.com/">kthoom</a> into a new open source project: <a href="http://bitjs.googlecode.com/">http://bitjs.googlecode.com/</a>, Binary Tools for JavaScript.</p>
<p>The faster and faster JavaScript engines in modern browsers and the rise of new technologies like <a href="http://www.khronos.org/registry/typedarray/specs/latest/">Typed Arrays</a>, <a href="http://dev.w3.org/html5/workers/">Web Workers</a>, and <a href="http://www.w3.org/TR/FileAPI/">the File APIs</a> mean that browsers can actually be used to read in binary formats completely on the client-side (as long as native performance isn&#8217;t a requirement).</p>
<p>For now the library includes two main capabilities:</p>
<ul>
<li>streams for reading in bits and bytes from a Typed Array</li>
<li>unarchiving zip, rar or tar files (that&#8217;s right, you can unzip and unrar in JavaScript now)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2011/09/19/binary-tools-for-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One step closer to image editing on Wikipedia</title>
		<link>http://www.codedread.com/blog/archives/2011/02/24/one-step-closer-to-image-editing-on-wikipedia/</link>
		<comments>http://www.codedread.com/blog/archives/2011/02/24/one-step-closer-to-image-editing-on-wikipedia/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 04:44:59 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=1013</guid>
		<description><![CDATA[Oh, I forgot to mention a cool thing that happened at the beginning of the year while I was so busy: Wikipedia inched a step closer to having an in-browser editing experience for its impressive collection of vector image files via an experimental MediaWiki Extension. The extension was put together by Brion Vibber of StatusNet [...]]]></description>
			<content:encoded><![CDATA[<p><img xmlns="http://www.w3.org/1999/xhtml" width="100" height="100" style="float:right" src="http://codedread.com/clipart/svgedit.svgz" alt="I want to believe. SVG as an image format." />Oh, I forgot to mention a cool thing that happened at the beginning of the year while I was so busy:  Wikipedia inched a step closer to having an in-browser editing experience for its impressive collection of vector image files via an experimental <a href="http://www.mediawiki.org/wiki/Extension:SVGEdit">MediaWiki Extension</a>.  The extension was put together by <a href="http://identi.ca/brionv">Brion Vibber</a> of StatusNet and WikiMedia fame.  Fingers crossed for this to one day appear in Wikipedia! <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2011/02/24/one-step-closer-to-image-editing-on-wikipedia/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TypedArrays make me theoretically happy</title>
		<link>http://www.codedread.com/blog/archives/2011/02/23/typedarrays-make-me-theoretically-happy/</link>
		<comments>http://www.codedread.com/blog/archives/2011/02/23/typedarrays-make-me-theoretically-happy/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 17:11:10 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=1005</guid>
		<description><![CDATA[I&#8217;ve been busy at my day job not launching code, but over the weekend I had some fun converting kthoom&#8216;s unzip/inflate algorithm from using binary strings to using Typed Arrays. Typed Arrays mean native binary data that is accessible to JavaScript in the browser, making operations like unzip much much faster (like 4x). Unfortunately browser [...]]]></description>
			<content:encoded><![CDATA[<p><img xmlns="http://www.w3.org/1999/xhtml" width="100" height="100" style="float:right" alt="I want to believe. SVG as an image format." src="http://codedread.com/clipart/chrome.svgz" />I&#8217;ve been busy at my day job not launching code, but over the weekend I had some fun converting <a href="http://kthoom.googlecode.com/">kthoom</a>&#8216;s unzip/inflate algorithm from using binary strings to using <a href="http://www.khronos.org/registry/typedarray/specs/latest/">Typed Arrays</a>.  Typed Arrays mean native binary data that is accessible to JavaScript in the browser, making operations like unzip much much faster (like 4x).<span id="more-1005"></span></p>
<p>Unfortunately browser support is limited to WebKit nightlies (Chromium 11) and Firefox 4 at this time.  To compound this, Firefox did not bother to implement <a href="http://dev.w3.org/2006/webapi/FileAPI/#readAsArrayBuffer">FileReader.readAsArrayBuffer()</a> which means you can&#8217;t use the File API to read in binary data yet&#8230; uh&#8230; WTF?  So basically I no longer support Firefox in kthoom.  Oh well, the performance benefits cannot be ignored and they&#8217;ll eventually get there.  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=632255">Bug</a>.</p>
<p>That&#8217;s not to say WebKit is all peachy-keen.  You currently can crash Chromium OSX nightlies by <a href="http://code.google.com/p/chromium/issues/detail?id=42342">creating an ArrayBuffer of unusual size</a> and there are some issues passing <a href="http://code.google.com/p/chromium/issues/detail?id=73313">ArrayBuffers into web workers</a>.  This means that I disabled use of <a href="http://www.w3.org/TR/workers/">Workers</a> in kthoom as a result and everything happens in a single thread. :-/</p>
<p>Oh, and you can&#8217;t easily <a href="https://www.khronos.org/webgl/public-mailing-list/archives/1102/msg00145.html">convert bytes from TypedArrays into strings</a>&#8230;</p>
<p>FML.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2011/02/23/typedarrays-make-me-theoretically-happy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVG/Canvas Marketshare: Nov 2010</title>
		<link>http://www.codedread.com/blog/archives/2010/12/21/svgcanvas-marketshare-nov-2010/</link>
		<comments>http://www.codedread.com/blog/archives/2010/12/21/svgcanvas-marketshare-nov-2010/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 17:31:48 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[canvas]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=995</guid>
		<description><![CDATA[I’ve updated my marketshare spreadsheet for Nov 2010 charting the percentage of web users who can view SVG and Canvas: 44.57% I&#8217;m also tracking what percentage of web users can see SVG in an &#60;img&#62; tag: 18.41%]]></description>
			<content:encoded><![CDATA[<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/svg.svgz" alt="I want to believe. SVG as an image format."></img>I’ve updated my marketshare spreadsheet for Nov 2010 charting the percentage of web users who can view SVG and Canvas:  <strong>44.57%</strong></p>
<p><iframe width="400" height="440" src="http://spreadsheets.google.com/pub?key=t5TB0_qFXcrkEndedXkKaug&#038;output=html"/></p>
<p>I&#8217;m also tracking what percentage of web users can see SVG in an &#60;img&#62; tag: 18.41%</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/12/21/svgcanvas-marketshare-nov-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grooveshark rocking teh HTML5</title>
		<link>http://www.codedread.com/blog/archives/2010/12/05/grooveshark-rocking-teh-html5/</link>
		<comments>http://www.codedread.com/blog/archives/2010/12/05/grooveshark-rocking-teh-html5/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 05:53:30 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=969</guid>
		<description><![CDATA[Grooveshark recently deployed an updated UI done in HTML5 instead of Flash. In a word, it&#8217;s awesome. Scrolling is smoother. Text is fully selectable. I like being able to resize the UI (I don&#8217;t think their previous Flash interface allowed zooming at all). I really hope Grooveshark can find a successful revenue model that will [...]]]></description>
			<content:encoded><![CDATA[<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/grooveshark.svgz" alt="I want to believe. SVG as an image format."></img><a href="http://www.grooveshark.com/">Grooveshark</a> recently deployed an updated UI done in HTML5 instead of Flash.  In a word, it&#8217;s awesome.  Scrolling is smoother.  Text is fully selectable.  I like being able to resize the UI (I don&#8217;t think their previous Flash interface allowed zooming at all).  I really hope Grooveshark can find a successful revenue model that will keep it alive.<span id="more-969"></span></p>
<p>But this just seems to be part of the overall growing trend towards sexy HTML5 user interfaces.  <a href="http://netflix.com/">Netflix</a> is another one as described in their <a href="http://techblog.netflix.com/2010/12/why-we-choose-html5-for-user.html">recent post</a>.</p>
<p>The industry has been steadily shifting into the next phase of web development for a couple years &#8211; we&#8217;re nearly there now.  Well since IE6 is no longer a concern (or hadn&#8217;t you heard &#8211; less than 5% of web users last month and still dropping), IE7 is quickly shuffling off the stage (~12% and steadily dropping), and IE9 is waiting in the wings.</p>
<p>Oh and IE8?</p>
<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/ie.svgz" alt="I want to believe. SVG as an image format."></img>Yeah I don&#8217;t share in the pessimism of some who think that <a href="http://infrequently.org/2010/10/ie-8-is-the-new-ie-6/">IE8 is the new IE6</a>.  And there are a lot of reasons I don&#8217;t:</p>
<ul>
<li>Month-by-month, the total marketshare of all IE versions combined has been steadily dropping.  From 95% six years ago to about 50% now.  Any gains on this percentage will be with IE9, not anything older.</li>
<li>There are now more major modern browsers and platforms than ever before supported by companies with lots of cash and lots of push.</li>
<li>Unlike IE6 at the time, IE8 simply does not have the capabilities expected of the average web developer.  Given the numbers in my first point, next year there will be more users supporting SVG, Canvas, HTML5 audio/video than don&#8217;t.  It makes mathematical sense to target modern browsers first.</li>
<li>In a year and a half, Windows 7 went from nothing to a quarter of all desktops.  At the end of next year, I predict XP users will be a minority among Microsoft desktops.  Any Windows 7 users will be using IE9 in a year, not IE8.</li>
<li>Google&#8217;s <a href="http://code.google.com/chrome/chromeframe/">Chrome Frame</a> plugin can be used to target IE8- users if you can convince them to download/install it.  Disclaimer: I work for Google.</li>
</ul>
<p>As for my own responsibility as a web developer&#8230; well, I&#8217;ve been developing for IE9+ for about 5 years now.  I just didn&#8217;t know it at the time <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/12/05/grooveshark-rocking-teh-html5/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>SVG/Canvas Marketshare: Oct 2010</title>
		<link>http://www.codedread.com/blog/archives/2010/11/09/svgcanvas-marketshare-oct-2010/</link>
		<comments>http://www.codedread.com/blog/archives/2010/11/09/svgcanvas-marketshare-oct-2010/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 17:07:49 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=965</guid>
		<description><![CDATA[I’ve updated my marketshare spreadsheet for Oct 2010 charting the percentage of web users who can view SVG and Canvas: 44.11% I also started tracking what percentage of web users can see SVG in an &#60;img&#62; tag: 18%]]></description>
			<content:encoded><![CDATA[<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/svg.svgz" alt="I want to believe. SVG as an image format."></img>I’ve updated my marketshare spreadsheet for Oct 2010 charting the percentage of web users who can view SVG and Canvas:  <strong>44.11%</strong></p>
<p><iframe width="400" height="430" src="http://spreadsheets.google.com/pub?key=t5TB0_qFXcrkEndedXkKaug&#038;output=html"/></p>
<p>I also started tracking what percentage of web users can see SVG in an &#60;img&#62; tag: 18%</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/11/09/svgcanvas-marketshare-oct-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVG/Canvas Marketshare: Sep 2010</title>
		<link>http://www.codedread.com/blog/archives/2010/10/10/svgcanvas-marketshare-sep-2010/</link>
		<comments>http://www.codedread.com/blog/archives/2010/10/10/svgcanvas-marketshare-sep-2010/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 17:28:33 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[svg browsers]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=959</guid>
		<description><![CDATA[I’ve updated my marketshare spreadsheet for Sep 2010 charting the percentage of web users who can view SVG and Canvas: 43.10% I also started tracking what percentage of web users can see SVG in an &#60;img&#62; tag. Currently that&#8217;s at about 16%, up from 8% a year ago. I expect that number to soar dramatically [...]]]></description>
			<content:encoded><![CDATA[<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/svg.svgz" alt="I want to believe. SVG as an image format."></img>I’ve updated my marketshare spreadsheet for Sep 2010 charting the percentage of web users who can view SVG and Canvas:  <strong>43.10%</strong></p>
<p><iframe width="400" height="420" src="http://spreadsheets.google.com/pub?key=t5TB0_qFXcrkEndedXkKaug&#038;output=html"/></p>
<p>I also started tracking what percentage of web users can see SVG in an &#60;img&#62; tag.  Currently that&#8217;s at about 16%, up from 8% a year ago.  I expect that number to soar dramatically once Firefox 4 and IE9 are released.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/10/10/svgcanvas-marketshare-sep-2010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Start Chopping Off Heads</title>
		<link>http://www.codedread.com/blog/archives/2010/09/21/start-chopping-off-heads/</link>
		<comments>http://www.codedread.com/blog/archives/2010/09/21/start-chopping-off-heads/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 17:02:10 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[w3c]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=945</guid>
		<description><![CDATA[Because my kids are now old enough to grok some complex games, I&#8217;ve introduced them to the Magic: The Gathering card game. They love it. I love it. To continue the fun, we went to a local comic book store and bought a couple booster packs, which apparently are still being sold throughout the world. [...]]]></description>
			<content:encoded><![CDATA[<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/hydra.svgz" alt="I want to believe. SVG as an image format."></img>Because my kids are now old enough to grok some complex games, I&#8217;ve introduced them to the <a href="http://en.wikipedia.org/wiki/Magic:_the_gathering">Magic: The Gathering</a> card game.  They love it.  I love it.  To continue the fun, we went to a local comic book store and bought a couple booster packs, which apparently are still being sold throughout the world.  One of my kids got a <a href="http://www.amazon.com/Protean-Hydra-Magic-Mythic-Gathering/dp/B002TJX23W">Protean Hydra</a>.  Sweet!  The <a href="http://en.wikipedia.org/wiki/Lernaean_Hydra">Hydra</a> is a mythical beast with nine heads, and every time you chop off a head, two more grow back.</p>
<p>The web is like that.  And we&#8217;re not <a href="http://hsivonen.iki.fi/spacer/">chopping off heads</a> fast enough. <span id="more-945"></span></p>
<p>Now that Internet Explorer has come out of its corner swinging with SVG support, I figured it&#8217;s time to make sure we can actually deploy web pages with SVG content in them.  Did you know that there are at least <em>thirteen</em> ways to deploy SVG on the web?</p>
<ul>
<li>inline in <a href="http://dev.w3.org/html5/spec/the-map-element.html#svg-0">HTML5</a> as <em>not-XML</em> (or !XML as I like to call it)</li>
<li>inline in XHTML (1.1 or 5) as XML</li>
<li>via the <a href="http://dev.w3.org/html5/spec/embedded-content-1.html#the-img-element">HTML:img</a> element</li>
<li>via the <a href="http://dev.w3.org/html5/spec/the-iframe-element.html#the-object-element">HTML:object</a> element</li>
<li>via the <a href="http://dev.w3.org/html5/spec/the-iframe-element.html#the-embed-element">HTML:embed</a> element</li>
<li>via the <a href="http://dev.w3.org/html5/spec/the-iframe-element.html#the-iframe-element">HTML:iframe element</a></li>
<li>via the <a href="http://www.w3.org/TR/2010/WD-SVG11-20100622/struct.html#ImageElement">SVG:image</a> element</li>
<li>via the <a href="http://www.w3.org/TR/2010/WD-SVG11-20100622/extend.html#ForeignObjectElement">SVG:foreignObject</a> element</li>
<li>as a fragment via the <a href="http://www.w3.org/TR/2010/WD-SVG11-20100622/struct.html#UseElement">SVG:use</a> element</li>
<li>via the <a href="http://www.w3.org/TR/CSS2/colors.html#propdef-background-image">background-image</a> CSS property</li>
<li>via the <a href="http://www.w3.org/TR/CSS2/generate.html#propdef-list-style-image">list-image</a> CSS property</li>
<li>via the <a href="http://www.w3.org/TR/2002/WD-css3-border-20021107/#the-border-image-uri">border-image</a> CSS property</li>
<li>directly linking and then browsing to a SVG file</li>
</ul>
<p>Does anyone know why the &#60;embed&#62; element was not deprecated in HTML5?  Was it the realities of the IE deployment difficulties around the &#60;object&#62; tag?  It sounds like IE9 will help to fix that so maybe &#60;embed&#62; can eventually be deprecated in HTML6 five years from now?</p>
<p>What&#8217;s worse is that the properties on the embedding context and the SVG elements affect how the SVG is rendered.  The width/height properties on &#60;object&#62;/&#60;embed&#62;/&#60;iframe&#62; tags.  The width/height/<a href="http://www.w3.org/TR/2010/WD-SVG11-20100622/coords.html#ViewBoxAttribute">viewBox</a> properties on the &#60;svg&#62; element.  The <a href="http://www.w3.org/TR/2010/WD-SVG11-20100622/coords.html#PreserveAspectRatioAttribute">preserveAspectRatio attribute</a> on the &#60;svg&#62; element.</p>
<p>The width attribute on a &#60;svg&#62; element can be specified in units of em, ex, px, in, cm, mm, pt, pc or it can be unitless or it can be a percentage.  Of course the height attribute can be specified in different units.</p>
<p>The embedding context also determines whether scripts are run within the SVG document. Hint: Should not be run in image contexts.</p>
<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/caution.svgz" alt="I want to believe. SVG as an image format."></img>But it gets worse.  Let&#8217;s just look at one case: embedding an SVG document in a web page via the &#60;object&#62; tag:</p>
<p><code>&#60;object type='image/svg+xml' data='...'&#62;&#60;/object&#62;</code></p>
<p>For the data attribute you can specify a local file, a http/https URL or a data URI.  The browser can treat each of these cases differently.</p>
<p>The file served to the browser can have a MIME type of image/svg+xml or text/xml or application/xml.  Browsers might do something different in these cases (though they shouldn&#8217;t).</p>
<p>If the width/height on the &#60;object&#62; tag are specified, they should override the &#60;svg&#62; width/height if the &#60;svg&#62; width/height are in absolute (not relative/percentage) units.  The coordinate system of the SVG should map to the viewBox attribute unless the viewBox attribute is not specified, in which case it should be inferred.  Got all that?</p>
<p>If width/height on &#60;object&#62; are not specified, and width/height of the SVG are specified in absolute terms, then the size of the &#60;object&#62; frame should change to match the size of the SVG.</p>
<p>If width/height on &#60;object&#038; are not specified on a Tuesday of a leap year, and the SVG document has an odd-number of bytes in it and includes the string &#8216;rick&#8217; or &#8216;roll&#8217; anywhere in it, then the browser should play a video instead.</p>
<p>I&#8217;m not making this up, it&#8217;s <a href="http://goo.gl/Bxjk">right here</a> in the spec.</p>
<p>Actually the difficulty of this case is that there are so many dimensions and that it&#8217;s spread across multiple specs: HTML, CSS, SVG.  I think WICD/CDF was supposed to address some (all?) of these cases, but &#8230; are those specs actually valid?  And by that I mean, are browser vendors paying attention to them?  As Dolores O&#8217;Riordan might say: Does anyone care?</p>
<p><img width="100" height="150" style="float:right" src="http://codedread.com/clipart/iphone.svgz" alt="I want to believe. SVG as an image format."></img>There&#8217;s something to be said for the simplicity of the iPhone&#8217;s &#8220;one&#8221; button.  Android&#8217;s addition of the &#8220;Back&#8221; button is a perfect example of how a system can be incrementally improved.</p>
<p>Anyway, I&#8217;ve started to look at just three dimensions of this n-dimensional problem:  the HTML embedding context, width/height and viewBox.  I wrote a <a href="http://codedread.com/browser-tests/svg-image/html.html">test case</a> showing the 16 possible combinations.  I was not really shocked that between all the four major browser engines, only one case displayed consistently across all latest builds: as an &#60;img&#62; with width/height specified on both &#60;img&#62; and &#60;svg&#62;.</p>
<p>I&#8217;m really tired of reading specs (I&#8217;m sure this will pass), so in absence of a <a href="http://lists.w3.org/Archives/Public/www-svg/2010Sep/0081.html">reference rendering</a> of this page, we&#8217;ll just need to do what we always do: Make it look the same across all browsers.  Now that we have IE9, it can act as a tie-breaker between renderings that could be argued one way or the other <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Hopefully I&#8217;ll be able to talk more about these 16 cases in the future.  Now you know where to come if you&#8217;re having trouble sleeping.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/09/21/start-chopping-off-heads/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>SVG/Canvas Marketshare: Aug 2010</title>
		<link>http://www.codedread.com/blog/archives/2010/09/12/svgcanvas-marketshare-aug-2010/</link>
		<comments>http://www.codedread.com/blog/archives/2010/09/12/svgcanvas-marketshare-aug-2010/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 16:33:21 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[canvas]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=921</guid>
		<description><![CDATA[I’ve updated my marketshare spreadsheet for Aug 2010 charting the percentage of web users who can view SVG and Canvas: 41.08% Still looking for more stats sites &#8211; it seems that W3Counter is also not reliable (their public web stats for August were still not generated as of Sep 12th).]]></description>
			<content:encoded><![CDATA[<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/svg.svgz" alt="I want to believe. SVG as an image format."></img>I’ve updated my marketshare spreadsheet for Aug 2010 charting the percentage of web users who can view SVG and Canvas:  <strong>41.08%</strong></p>
<p><iframe width="300" height="360" src="http://spreadsheets.google.com/pub?key=t5TB0_qFXcrkEndedXkKaug&#038;output=html"/></p>
<p>Still looking for more stats sites &#8211; it seems that W3Counter is also not reliable (their public web stats for August were still not generated as of Sep 12th).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/09/12/svgcanvas-marketshare-aug-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Shit Has Come To Light</title>
		<link>http://www.codedread.com/blog/archives/2010/09/10/new-shit-has-come-to-light/</link>
		<comments>http://www.codedread.com/blog/archives/2010/09/10/new-shit-has-come-to-light/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 17:04:34 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=926</guid>
		<description><![CDATA[Those wacky Mozilla guys just fixed a bug I&#8217;ve been waiting years for: They now support SVG in &#60;img&#62; tags (and in most image contexts, for example background-image). This will be available in Firefox 4 Beta 6 and beyond (or download a nightly). See SVG really has two roles on the web scene: as document [...]]]></description>
			<content:encoded><![CDATA[<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/beer-mug.svgz" alt="I want to believe. SVG as an image format."></img>Those wacky Mozilla <a href="http://blog.dholbert.org/" title="Ok, just one guy, Daniel, but he had help reviewing!">guys</a> just fixed <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=276431">a bug</a> I&#8217;ve been waiting years for:  They now support SVG in &#60;img&#62; tags (and in most image contexts, for example background-image).  This will be available in Firefox 4 Beta 6 and beyond (or <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/">download a nightly</a>).<span id="more-926"></span></p>
<p>See SVG really has two roles on the web scene:  as document and as image.  For a long time I&#8217;ve been really excited about SVG-as-a-document because web documents have a DOM, are scriptable, can be styled, have semantics &#8211; that goody bag is really stuffed.  I&#8217;ve been less excited about SVG-as-an-image because frankly it hardly worked anywhere and I had no prospect of the situation improving.  Now that Firefox is finally onboard and IE9 is waiting in the wings we are about to embark on a new era of capabilities for the web that we can begin to rely on in less than a year.</p>
<p>Why is it important?</p>
<p>For one, SVG-as-an-image means that your images scale perfectly at any screen resolution.  This will generally mean crisper images than their uncouth raster cousins with no lossiness.</p>
<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/tools.svgz" alt="I want to believe. SVG as an image format."></img>For two, SVG images <em>can</em> be smaller in size than their equivalent raster counterpart (especially when gzipped).  This is dependent upon the level of detail you&#8217;ve put into the image and the tools that produced the image.  Tav just published <a href="http://tavmjong.free.fr/blog/?p=79">an article</a> about how to improve this and I&#8217;ve talked long about <a href="http://codedread.com/scour">scour</a> in the past too.  Keep up, will ya?</p>
<p>So SVG images can look better and have fewer bytes than their raster counterparts.  Booyahs all the way around.</p>
<p>And they can go a lot more places than the &#60;object&#62; tag.  Feed readers, for one.</p>
<p>Of course there are challenges:</p>
<ul>
<li>Not ubiquitous.  Yet.  We have to wait at least a year or more for that to be the case on the desktop but now there is definite momentum.  Android appears to be the only holdout on the mobile web side and it&#8217;s being looked at.  Let&#8217;s circle back in a year, mkay?</li>
<li>Performance?  SVG images have more capabilities than a standard raster image (declarative animation, external styling) so I would suspect SVG images require more juice to display.  <a href="http://www.latenightpc.com/blog">Rob</a> and others talked about SVG performance at this year&#8217;s <a href="http://svgopen.org/" title="Argh, I wish I could have made it!">SVG Open</a>.  Frankly I suspect that things can be done on the browser side to optimize this case, so I look forward to learning more when you comment on my blog <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Lot of crufty SVG out there.  This situation is improving too over time.</li>
<li>Some SVGs don&#8217;t have an intrinsic size (gee I hope I&#8217;m using this term right) and most things expect an image to have a size.  PNG files contain their width/height in the bytes of the file header.  The width/height values on &#60;svg&#62; elements default to 100%/100%.  Some browsers have a problem with this (ok, WebKit mostly).  If you want to use SVG files as images, I suggest you start fixing WebKit bugs (or update your SVG files to have an explicit width/height).  Can someone (Doug? Fantasai?) clarify what is supposed to happen if an SVG file has width/height at 100% and the &#60;img&#62; tag does not specify a width/height?</li>
<li>Not a lot of software/services accept SVG as an image type yet.  I&#8217;m looking straight at you to help me change this.</li>
</ul>
<p><img width="100" height="100" style="float:right" src="http://codedread.com/clipart/villain.svgz" alt="I want to believe. SVG as an image format."></img>So my take is that we&#8217;re at about 15% of web users who can actually see SVG images (as compared to about 40% of web users that can see SVG documents).  Since I&#8217;m such a SVG <del>fascist</del> <ins>fan</ins> I&#8217;ve decided to change my WordPress clipart quicktag to use &#60;img&#62; instead of &#60;object&#62;.  This means that a lot of you Firefox users won&#8217;t be able to see my blog clipart and for that I apologize up-front.  Come back and read it when you&#8217;re using Firefox 4?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/09/10/new-shit-has-come-to-light/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

