vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
575 stars 102 forks source link

Black background in jpg #59

Open vanrzuf opened 8 years ago

vanrzuf commented 8 years ago

Hello, disabling images in manet makes screenshots with black background in jpg, jpeg. Is there any option to set background color by hand?

vbauer commented 8 years ago

@vanrzuf Hello, could you provide some URL which I can test? I've just checked to capture JPG from https://github.com/vbauer/manet and everything looked fine (http://localhost:8891/?url=https%3A%2F%2Fgithub.com%2Fvbauer%2Fmanet&images=false).

vanrzuf commented 8 years ago

Hi, sure. http://whos.amung.us/ is that nasty site. 01.05.2016 00:31 Vladislav Bauer notifications@github.com napisał(a):@vanrzuf Hello, could you provide some URL which I can test? I've just check to capture JPG from https://github.com/vbauer/manet and everything looks fine (http://localhost:8891/?url=https%3A%2F%2Fgithub.com%2Fvbauer%2Fmanet&images=false).

—You are receiving this because you were mentioned.Reply to this email directly or view it on GitHub

vbauer commented 8 years ago

I've got the following results:

PhantomJS (http://localhost:8891/?url=http%3A%2F%2Fwhos.amung.us&images=false&engine=phantomjs):

image

SlimerJS (http://localhost:8891/?url=http%3A%2F%2Fwhos.amung.us&images=false&engine=slimerjs):

image

Are they wrong?

vanrzuf commented 8 years ago

Please check this ?url=http%3A%2F%2Fwhos.amung.us%2F&format=jpeg&images=false&engine=phantomjs in default PNG there is no background in the screenshot. With format set to jpg/jpeg background is black. 01.05.2016 02:04 Vladislav Bauer notifications@github.com napisał(a):I've got the following results:

PhantomJS (http://localhost:8891/?url=http%3A%2F%2Fwhos.amung.us&images=false&engine=phantomjs):

SlimerJS (http://localhost:8891/?url=http%3A%2F%2Fwhos.amung.us&images=false&engine=slimerjs):

Are they wrong?

—You are receiving this because you were mentioned.Reply to this email directly or view it on GitHub

vbauer commented 8 years ago

Thank you for information. I reproduced the problem, but at the current moment I don't have any idea how to fix it. Probably we have some problem with PhantomJS engine...

vbauer commented 7 years ago

FYI, Interesting, I've just got locally another situation - background is transparent, not black Probably, it depends on the version of PhantomJs

malayladu commented 7 years ago

It happens when you don't set the height of a viewport and you are trying to take a screenshot of a bigger height than the content of a website. At that time blank background appears.

Below, I have taken the screenshot without setting the height of a viewport.

ffe6e99663ac758660bfc1e956320642e4b17ddd

Here's the screenshot in which I have set the height of a viewport.

2baac7dbc044a5b25a63a22cd39d7e9ff33b5d1b