maaaaz / webscreenshot

A simple script to screenshot a list of websites
GNU Lesser General Public License v3.0
653 stars 162 forks source link

Window Size Configuration (either default or not) Doesn't Seem to Work #44

Closed fededamian closed 4 years ago

fededamian commented 4 years ago

Hello maaaaz, and thanks again for this great tool and the support. Today I am reporting an issue that seems pretty obvious to me, so I don't know if it happens under certain conditions in my environments, although I tested it both on Linux and Mac. Let me know if I can provide more data than the following:

Output Image:

https_www apple com_443_mx_mac_

maaaaz commented 4 years ago

Hello @fededamian,

Thanks your support !

Indeed that bug seems to be trivial:

Could you try with another renderer ?

fededamian commented 4 years ago

Thanks for the answer @maaaaz ,

Based on the README, I guess the other renderers have bigger issues than this one (no support for sites with invalid certs or no support for concurrency), so I think I'll stick with phantomjs and maybe add some post-processing of the image after I grab it.

maaaaz commented 4 years ago

Thanks for the answer @maaaaz ,

Based on the README, I guess the other renderers have bigger issues than this one (no support for sites with invalid certs or no support for concurrency), so I think I'll stick with phantomjs and maybe add some post-processing of the image after I grab it.

That is a good idea, I guess you can do it with imagemagick

fededamian commented 4 years ago

I was able to achieve this goal by using the following imagemagick command (if the output of webscreenshot is a picture with the filename image.png):

convert image.png -crop 640x480+0+0 +repage -background black -extent 640x480+0+0 image.png

Which either crops or enlarges the image to the desired resolution.

maaaaz commented 4 years ago

Added this issue in FAQ for reference.