0
I am trying to automate website screenshots on my (headless) server as follows:
Start a virtual X server:
Xfvb :1 -pixdepths 16,24,32 -screen 1 1080x1440x24 -nolisten tcp
First I tried taking screenshots with cutycaps:
DISPLAY=:1 cutycapt --url=http://myurl --out=screenshot.png
This works with full colors, but the webkit engine is too old to support our CSS, so the web page does not display properly.
So I tried Firefox and ImageMagick:
nohup firefox http://myurl &
sleep 4
import -display :1 -window root screenshot.png
Sadly, the resulting image has only 16? 256? colors. Definitely not enough.
So I tried xwd:
xwd -root -display :1 -out screenshot.xwd
Still no luck, still just 16 colors. Any ideas?