question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Snapshot image quality issue

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 0.13.0
  • Platform / OS version: Ubuntu 16.04 LTS
  • URLs (if applicable):

What steps will reproduce the problem?

  const browser = await puppeteer.launch({
    args: ['--no-sandbox', '--disable-setuid-sandbox'],
  })
  const page = await browser.newPage();
  page.setViewport();
  await page.goto(
    `data:text/html;charset=utf-8;base64,${new Buffer(htmlString).toString(
      'base64',
    )}`,
    {
      timeout: 120000,
    },
  )
  await page.screenshot({
    type: 'png',
    path: outputFileName,
    fullPage: true,
  })

As you may be able to see below, the quality in image 1 is significant higher than that of image 2. There are blurry edges on both the words and images within the snapshot, I am wondering if there are ways to increase the quality of the snapshot image using puppeteer without increasing the deviceScaleFactor, as I need the images to be of specific dimensions.

on Windows PC using chrome to render the HTML and screenshot snipping tool (image 1): image snapshot using puppeteer on Ubuntu (image 2): image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:5

github_iconTop GitHub Comments

4reactions
chunslicommented, Jan 5, 2018

Side note, we tried node-sharp as well, the scaled down image quality is not good enough as well.

4reactions
KyleGoddardcommented, Dec 11, 2017

having the same issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Take High-Resolution Screenshots For Your Articles
Are you having a hard time taking a high-resolution screenshot on your computer? Here is why the quality is bad and how you...
Read more >
A Guide on How to Take High-Quality Screenshots - SendPulse
Learn how to take high-quality screenshots in no time. Look at the basics of capturing a screenshot and discover some helpful tools and ......
Read more >
How to take a screenshot with high resolution quality - Quora
The best solution is to take the screenshot and if you are on a Windows PC then paste the screenshot in paint and...
Read more >
Quality of image file: screenshot of the image vs original image
If the original image is at 100% zoom (so each pixel on the screen represents exactly one pixel from the original image) then...
Read more >
Images captured by Snapshot is obscure. How to make it ...
Image resolution can be set under File – Preferences – General. Please check the option Use fixed resolution for snapshots then change a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found