These are chat archives for rosshinkley/nightmare

9th
Aug 2016
Alexander
@belyanskii
Aug 09 2016 21:26

Hi guys! Can anyone help me, when i use "screenshot" method, i receive double-sized image o__O

P.S. - i do this on MacPro with Retina, maybe problem in it?

Rob Brackett
@Mr0grog
Aug 09 2016 23:06
Yeah, Chromium will automatically render at the resolution for whatever monitor it's on
I believe you can change it using the force-device-scale-factor switch, but it's possible that might just make the image blurry; I haven't tested screenshotting with it
e.g.
Nightmare({
  switches: {
    'force-device-scale-factor': '1'
  }
})
  .goto('http://google.com')
  .screenshot()
  .end()
  .then(function(imageBuffer) {
    // write image to disk or whatever you'd like to do
  });
^ @belyanskii hope that helps