3

I have a problem using CutyCapt to create images rendered for a particular screen size.

For example, if I do these:

xvfb-run --server-args="-screen 0, 800x600x24" \
  ~/bin/CutyCapt/CutyCapt --url='http://stackoverflow.com/search?page=2&tab=relevance&q=cutycapt%20xvfb' \
    --out=STACKOVERFLOW_1.png
xvfb-run --server-args="-screen 0, 800x600x24" \
  ~/bin/CutyCapt/CutyCapt --url='http://stackoverflow.com/questions/65078/what-is-the-best-way-to-create-a-web-page-thumbnail' \
    --out=STACKOVERFLOW_2.png

I get images of sizes:

STACKOVERFLOW_1.png : 975x2611
STACKOVERFLOW_2.png : 975x2226

I believe any stackoverflow page will be of a width of 975 pixels. This is not what I asked (w=600).

Is it possible to create images using CutyCapt with Xvfb that are rendered for a particular screen width?

PS: uname -a yields Linux yalabs-linux0.yandex.net 2.6.27-17-server #1 SMP Fri Mar 12 02:48:52 UTC 2010 x86_64 GNU/Linux

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
bzdjamboo
  • 267
  • 1
  • 3
  • 7

1 Answers1

2

CutyCapt is working as designed. The size of the X screen is irrelevant (unless the site's stylesheet depends on it, which is a terrible but common idea). Stack Overflow renders for a fixed width, regardless of the browser window width, so you get an image of that width.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175