Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full page screenshots #9

Open
ti2m opened this issue Feb 4, 2014 · 3 comments
Open

Full page screenshots #9

ti2m opened this issue Feb 4, 2014 · 3 comments
Assignees

Comments

@ti2m
Copy link

ti2m commented Feb 4, 2014

Is it somehow possible to capture the full page in a screenshot and not just the viewport, like with phantom? I tried setting the viewport, but the hight is always limited by my screen height.
I found the related FF issue, so I almost assume same accounts for chrome, just wanted to make sure I'm not missing anything. Thanks!

@asciidisco asciidisco self-assigned this Feb 16, 2014
@asciidisco
Copy link
Member

Unfortunately the spec isn't clear about this particular thing & so browser vendors did different implementations. You could execute some JavaScript within the browser, forcing it to scroll down the viewport height, screenshotting, scrolling down ... ... until the end of the page has been reached.

I´ll investigate if we could implement something within Dalek itsels.

@ti2m
Copy link
Author

ti2m commented Mar 10, 2014

Writing the script to scroll shouldn't be too hard, combining the parts to a complete screenshot might be tricky though. I check, when taking a screenshot with e.g. witdh 1000px, the scrollbar is included within the 1000px. The different parts would need to be cropped, I'll check if you can easily get the scrollbar width, otherwise it will be hard to know where exactly to cut off the image.

Haven't looked at how png's are encoded, but I assume you can't just combine the encoded data into a new file. We would then need to decode all the parts, put them together and encode it again. I have used 'png-js' to decode png's into an linear pixel array of rgba values, but it doesn't support encoding. Wasn't to happy with 'node-pngjs' (don't remember why), but it supports both encoding and decoding. That's the lowest level I see right now that lets you easily combine png's?

@jensgro
Copy link

jensgro commented Jul 7, 2014

Adding the necessary JS for scrolling down to the dalek-project would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants