I'm thinking it would be the easiest to do this via DOM manipulation. Sequentially set visibility: hidden to all elements except one, take screenshot, continue on to the next one. Not the most elegant solution, but it's quick and you don't need to understand WebKit or Gecko's source.
I wrote a bookmarklet that would capture all mouse events and let you rearrange elements on the page... I'll see if I can find it.
edit: I can't seem to find it at the moment, but it was fairly simple. Intercept all mouse events, determine the clicked element, record the initial position, start dragging, etc. I think it did some fanciness for non-absolutely positioned or non-block elements too.
The difference between this and various screen shot addons is that it outputs each piece as a photoshop layer, so they can be easily hidden/moved around.
If you take a screen shot then load it into photoshop and move around a window, you'll get a big white box where the window was, because the screenshot app didn't record any information 'underneath' the window.
I just spent a few hours looking into doing this, and all I can say is kudos to them for decoding the psd file format =P.
None of the big graphics libraries (GD, Image Magick, etc) support writing of layered PSD files (Imagick can read them, and export non-layered's, but that's it as far as I can tell.), and the format specs require you to sign an NDA/non-compete with Adobe.
Taking the screenshots is doable if a bit of a pain, but short of reverse engineering the psd format, the second part seems to be a roadblock. Shame, i'd use this too =P.
The Gimp (http://gimp.org/) can load _and_ save PSD-files with layers, so you could probably find most of the reverse engineering already done in the code there.
While you are at it, why not just save the file in Gimp format and be done with it? :-)
This is cool and all, but what's the utility? You can already isolate individual windows and arbitrary screen regions with the built-in OS X screenshot grabber.
You have a webpage open in firefox, safari, IE (via parallels). You grab all three in one go and reposition them on top of each other to get pixel accurate offsets?
Agreed. While I can see that it's a clever thing and nicely done, I can't think of anyone who routinely needs to screenshot all (or at least multiple) windows at once but separately.
Someone who saves a ton of time using this, please tell us what you're using it for!
As someone who does a lot of UI mockups, something like this would be extremely handy. As someone else pointed out, if this saved me an hour of my life, it would pay for itself. If it saved me two hours, it would be saving me money. And an hour of set-up time occupied by taking and assembling selected separate shots of various tool palettes, settings windows, and main editor screens, for instance, would not be out of the question.
It's the "one fell swoop" aspect that is appealing. Just being able to open every possible window in an app and then hit "capture this to Photoshop" when starting on a UI clean-up pass mockup, or for creating a master document of all windows when taking a desktop app from 1st pass programmer art to shipping resources, and sorting them into Photoshop layers and folders, would skip a lot of currently requisite document setup/prep time.
The suggestion to use this to more quickly build manuals and tutorials is also spot on. Grabbing the current state of all windows in an app at "step 3" of a tutorial, and then being able to nudge them around to best facilitate the required tutorial/manual text, without having to manually capture all elements separately, is pretty sweet.
I just sent it to someone who publishes Photoshop tutorials for a magazine--lots of shots involve multiple windows and the layout people love to be able to play around with that sort of stuff.
In this particular form, it's probably not very useful at all -- but identifying edges, or extracting 'foreground' images from 'background' images automatically with clean edges is something that would be ridiculously useful for videography, photo editing, or just graphic design in general.
Furthermore, if you advance the technology to being able to scan a photo of, say, an airport lobby, break each component into layers, and then perform shape identification on each of the identified pieces, you've got left-package detection or weapon identification technologies available to you (potentially.)
You're right. A true hacker never writes user documentation for his software, so this is definitely not hacker news. (Ignore this comment if you only ever use MDI applications).
Edit: My bad, MDI interface is as stupid as LCD display.
Hmm, I suppose that's a pretty good point. I would have a hard time justifying the purchase unless I were in a position where I regularly took screenshots of my desktop and needed to move windows around as separate layers on a regular basis.
I'm not sure why the parent is downmodded - it seems to me that $15 is indeed a relatively high price tag for something that seems like a single feature of a graphics program, albeit a useful feature.
People who take a lot of screenshots are willing to pay for convenience. SnapzPro has sold a ton of licenses at $69 for example. I just sent this app to my dad, he writes computer books and screenshots can be the bane of his existence--if it saves him time he'd pay 5x the price.
Update: He just wrote back, "I can't believe it's only $15!"