mardi 17 février 2015

Take a huge screenshot of a webpage (over 13500x13500px size)

I have about 3000 images of about 256x256px size (but some are 50x256 and some are 256x100 or so) which I wish to merge into one big picture. The images are shown in a webpage, thus the easiest way would be to take a screenshot of the said webpage. The webpage's image is of about 13500x13500px ! On theory, I could download all of the images and merge them together (with like bitmap() or CopyImage() or something like that but I really wish to go with an easier solution). Oh and this 3000->1 is one of about 120 in total cases that I have to do.


I've tried several methods, none of which worked out properly:



  • phantomJS (the .exe crashes after a while)

  • CutyCaps (the .exe crashes after a while)

  • Firefox's "screenshot --fullpage bla.png" (crashes with exception, known issue with huge pages since the dawn of firefox)

  • SeleniumSDK (FirefoxDriver, crashes after a while)

  • html2canvas (crashes or just won't start)

  • basic javascript and canvas work (failed miserably)

  • A dozen of the top extensions for firefox (takes forever, then crashes or produces a broken image)

  • A dozen of the top extensions for Chrome (takes forever, then crashes or produces a broken image)


The only service that ever worked out perfectly was http://web-capture.net but I really wish to have an offline/local method to generate the image, due to the amount of times that I'd have to visit any 3th party website.


If anyone could point me to any better offline service or a solution, I would be very grateful. Any working code snippets (preferably in either php/javascript/java/selenium/c#) are highly appreciated.


More on the project itself:


The source data is a photograph of a cell, shown with LeafletJS (similar to GoogleMaps). I made up a web scraper of sort, which pulls all the data from the viewer page and shows them as a one huge picture, formed out of thousands of other smaller images (with sometimes different sizes). The Histology course has about 120 different images that I'd wish to have locally stored, hence this whole exercise. Also, to make stuff interesting, every image is of different size, but lets say that it has about 55-60 columns and 50-80 rows of small 256x256 images, forming the big picture.


Here is a preview of what I'm talking about:


http://ift.tt/1MuT5am


Sorry for the long post, have a cookie.





Aucun commentaire:

Enregistrer un commentaire