I am looking for a solution to generate thumbnail images of screen shots of list of webs sites, and save to disk.
I found the following commands can do that. And I got a working shell script in ubuntu, which generates the images fine. (CutyCapt + ImageMagick packages)
cutycapt --url=http://www.yahoo.com --out=yahoo.png
convert yahoo.png -thumbnail 150x180^ -gravity NorthWest -extent 150x180 yahoothumb.jpg
But, it is sequential and taking lot of time. I thought of creating a PHP or Python script, which I will host as a web page in Apache. Then a separate program will generate multiple requests to increase the throughput of generating images.
I tried PHP first.
<?php echo exec('cutycapt --url=http://www.google.com --out=/var/www/google.png --javascript=on');?>
And CutyCapt fails with following: CutyCapt: Can not connect to X Server. I am running PHP/Apache with the same Identity/user that I run my regular shell script with.
Btw, I am a C# developer. So relatively less familiar with PHP, Linux, Scripts. I can deal with config files for PHP, Apache though :)
I have tried using .NET to launch IE in memory but it's cumbersome and also doesn't produce best results + needs STA: so it will be very less throughput.