viewportSize seems not to work with PhantomJS

后端 未结 4 1006
半阙折子戏
半阙折子戏 2021-01-02 01:21

Shouldn\'t the output from this PhantomJS script be 240x320 pixels? I\'m getting a large, default-sized image. clipRect() would seem to render the correct size image, but I

4条回答
  •  梦毁少年i
    2021-01-02 01:43

    This seems to work in the Mac binary for 1.9.7:

    page.set('viewportSize', {width: 320, height: 480});
    

提交回复
热议问题