The best new features wouldn’t have been possible without…
Screengrab, Thanks March 9th, 2007
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’ve thought of that – it’s genius.
The canvas grab is thanks to me stumbling on this page 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 Pearl Crescent Page Saver (their grabber is pretty good – 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’m not that smart, so I was using the language I know: Java. My ego decided that I couldn’t lose the Firefox screengrabbing race so I got back to work.
(There’s also another extension called Snapper that does this now. It’s good for quick shots.)
The copy feature 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’m not even doing it right, it’s a hack. I still don’t know how to put image data on the clipboard using the interfaces provided.
Anyway, here’s how the hack works…
- I grab the page and get the dataUrl from the canvas.
- I load the dataUrl into a hidden image in my extension chrome (it’s in the main overlay).
- I then trick Firefox into thinking that the last thing the user clicked on in the browser was this image that they can’t possibly see (so that it thinks the context menu would be using it).
- Then I invoke the command that drives the “Copy Image” context menu item.
(There’s also a couple of timers in there while I wait for Firefox to get with the program)
If you think that’s hacky, one day I’ll explain how I get Java to take those shots and scroll the page. It’s CRAZY!
7 Responses to “The best new features wouldn’t have been possible without…”
Leave a Reply
You must be logged in to post a comment.
March 17th, 2007 at 2:35 am
Nice job with screengrab!
But with the jpeg images are so compressed? Isn’t possible to be less agressive with the compression?
Anyway, it’s my favorite add-on.
March 17th, 2007 at 9:04 am
Sorry, I can’t do anything about it. I get the jpeg by asking Firefox to make it (using toDataUrl(“image/jpeg”). I don’t know how to set compression values. If anyone does then I’ll be happy to change it.
July 3rd, 2007 at 1:00 am
I was wondering if you were going to make a version for FF 2.0? The only reason I am still using FF 1.5 is because Screen-grab will not work on 2.0. I use SC a lot! Thanks for the best ext for FF!!!
August 28th, 2007 at 5:33 pm
I dont understand how to use The selection tool???
I want just a part of the web page but I use selection and a red shadow appear and I dont know what to do ?
Help.
September 12th, 2007 at 4:39 pm
We need keyboard shortcuts!
We want keyboard shortcuts!
We demand keyboard shotrcuts!
Long live KEYBOARD SHORTCUTS!
P.S. Amazing tool!
October 15th, 2007 at 8:10 am
can u improve JPG saving by setting save quality
February 27th, 2009 at 6:41 am
i cant find it anywhere
wheres is the icon located