<?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>Screengrab! &#187; Thanks</title>
	<atom:link href="http://www.screengrab.org/news/category/thanks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.screengrab.org</link>
	<description>It's a Firefox extension!</description>
	<lastBuildDate>Thu, 25 Mar 2010 20:39:50 +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>The best new features wouldn&#8217;t have been possible without&#8230;</title>
		<link>http://www.screengrab.org/news/2007/03/09/the-best-new-features-wouldnt-have-been-possible-without/</link>
		<comments>http://www.screengrab.org/news/2007/03/09/the-best-new-features-wouldnt-have-been-possible-without/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 19:31:37 +0000</pubDate>
		<dc:creator>andy</dc:creator>
				<category><![CDATA[Screengrab]]></category>
		<category><![CDATA[Thanks]]></category>

		<guid isPermaLink="false">http://www.screengrab.org/news/2007/03/09/the-best-new-features-wouldnt-have-been-possible-without/</guid>
		<description><![CDATA[The selection tool was inspired by (and reverse-engineered from) MeasureIt one of the cleverest extensions available for Firefox by a chap called Kevin A. Freitas. His technique involves injecting a transparent div and some javascript into the page you want to measure (and that I want to grab). I never would&#8217;ve thought of that &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The selection tool</strong> was inspired by (and reverse-engineered from) <a href="http://www.kevinfreitas.net/extensions/measureit/">MeasureIt</a> one of the cleverest extensions available for Firefox by a chap called <a href="http://www.kevinfreitas.net/">Kevin A. Freitas</a>. His technique involves injecting a transparent div and some javascript into the page you want to measure (and that I want to grab). I never would&#8217;ve thought of that &#8211; it&#8217;s genius.</p>
<p><strong>The canvas grab</strong> is thanks to me stumbling on <a href="http://weblogs.mozillazine.org/roc/archives/2005/05/rendering_web_p.html">this page</a> a couple of years ago and then waiting for the feature to be fully implemented in the browser. The motivation came from my main competitors <a href="http://pearlcrescent.com/products/pagesaver/">Pearl Crescent Page Saver</a> (their grabber is pretty good &#8211; but you have to pay for the selection box). who had been previously capturing images using some very clever native libraries to do their work. I&#8217;m not that smart, so I was using the language I know: Java. My ego decided that I couldn&#8217;t lose the Firefox screengrabbing race so I got back to work. </p>
<p>(There&#8217;s also another extension called <a href="https://addons.mozilla.org/firefox/2703/">Snapper</a> that does this now. It&#8217;s good for quick shots.)</p>
<p><strong>The copy feature</strong> was inspired by all of the people who said they wanted it as a feature. You would not believe how hard it was to do. I&#8217;m not even doing it right, it&#8217;s a hack. I still don&#8217;t know how to put image data on the clipboard using the interfaces provided.</p>
<p>Anyway, here&#8217;s how the hack works&#8230;</p>
<ul>
<li>I grab the page and get the dataUrl from the canvas.</li>
<li>I load the dataUrl into a hidden image in my extension chrome (it&#8217;s in the main overlay).</li>
<li>I then trick Firefox into thinking that the last thing the user clicked on in the browser was this image that they can&#8217;t possibly see (so that it thinks the context menu would be using it).</li>
<li>Then I invoke the command that drives the &#8220;Copy Image&#8221; context menu item.</li>
</ul>
<p>(There&#8217;s also a couple of timers in there while I wait for Firefox to get with the program)</p>
<p>If you think that&#8217;s hacky, one day I&#8217;ll explain how I get Java to take those shots and scroll the page. It&#8217;s CRAZY!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.screengrab.org/news/2007/03/09/the-best-new-features-wouldnt-have-been-possible-without/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
