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

screenshot #204

Open
robert-1043 opened this issue Jan 22, 2023 · 4 comments
Open

screenshot #204

robert-1043 opened this issue Jan 22, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@robert-1043
Copy link

I've been testing the new screenshot function.

It seems that the view-thumbnail-fullPage option generates each time a 1920x1080px image. Although file size between view and fullPage is remarkable (300kB vs 1MB).

Could it be the pixel size information on the fullPage image isn't correct?

Also had some differences in image content, does screenshot wait for the page to load?

@tw4l
Copy link
Member

tw4l commented Feb 2, 2023

Thanks for the notes @robert-1043 ! It's very possible the pixel size information for the fullPage screenshot is incorrect - the image will be whatever height is necessary to capture the full webpage, even if scrolling is required, not capped at 1080px. Where are you seeing the 1920x1080 pixel size reported for full page images?

@robert-1043
Copy link
Author

I had to take the images out of the warc file, then in any app that indicates pixel sizes (Windows properties / Photoshop / Metadata++). Have tried to edit the pixel information in the file itself, but no luck with that.

@tw4l
Copy link
Member

tw4l commented Feb 2, 2023

Thanks for the clarification! It looks like puppeteer is setting the pixel sizes in the image metadata according to what the initial display viewport is set at, hence the incorrect value for the height with full page screenshots. I believe simply not setting an initial viewport for full page screenshots should resolve the issue - thanks for pointing this out!

@tw4l
Copy link
Member

tw4l commented Feb 2, 2023

@robert-1043 can you try from this branch and see if you still have the issue? https://github.com/webrecorder/browsertrix-crawler/tree/full-page-screenshot-pixel-metadata-fix

@tw4l tw4l self-assigned this Feb 2, 2023
@tw4l tw4l added the bug Something isn't working label Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants