generate image (e.g. jpg) of a web page?

后端 未结 5 1318
深忆病人
深忆病人 2021-02-07 07:00

I want to create an image what a web page looks like, e.g. create a small thumbnail of the html + images. it does not have to be perfect (e.g. flash /javascript rendering).

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-07 07:46

    After reading this page, I was thinking, let me fire up midori browser: http://midori-browser.org/ and when I tried the -h option, I have seen:

      -s, --snapshot      Take a snapshot of the specified URI
    

    QutyCapt is difficult to compile, and has many dependencies. Midori has it less. It outputs the PNG of the website into TMP folder. One can get the file with:

    midori -s http://www.rcdwealth.com new.png 2>/dev/null | awk '{ print $4}'
    

    After that, the file can be converted to thumbnail size by using ImageMagick's convert program.

提交回复
热议问题