ariya/phantomjs — pull request #12839 by vegetableman (2014-12-18 20:19:47+00:00)
Title: Added devicePixelRatio support (fixes #10964)

fixes #10964

Example:-
```js
var webPage = require('webpage');
var page = webPage.create();

// An example url that supports @2x background-image with the following css:-
/* @media all and (-webkit-min-device-pixel-ratio: 1.5) {
body {
background-image: url('images/backgrounds/bg@2x.jpg');
}
} */
var examplePage = 'http://imulus.github.io/retinajs/';

//Pass a dpr of your choosing
page.devicePixelRatio = 1.5; // in this case, >=1.5 to get the retina-supporting bg-image

page.open(examplePage, function() {
page.render('2x.png'); // And it renders the @2x page
});
```