niklasvh / html2canvas

Screenshots with JavaScript
https://html2canvas.hertzen.com/
MIT License
30.4k stars 4.79k forks source link

option.maxImages or alike is/will be available? #110

Closed BananaAcid closed 7 years ago

BananaAcid commented 12 years ago

I would need an option to restrict the amount of images, because of memory issues (iPad closes Safari).

BA

niklasvh commented 12 years ago

Restrict the amount, as in an option to set how many images to load, and then just ignore everything after that limit has been reached?

I don't have an iPad so I can't really test this, but are you sure it is the number of images that is crashing it, and not for example the size (as in dimension) of the page? How many images cause the crash?

BananaAcid commented 12 years ago

to be more precise: i use an ipad1 with 5.1.1

i tried the demo page (testconsole / JavaScript screenshot creator):

engadget crashes always. --------- !

cnn : crashes after having clicked the others before... after restarting safari and starting it first, it works -- memory not cleaned of old stuff sufficently ?

smashingmagazine, mashable don't render.

yahoo, google, github,facebook, youtube work.

battlenet renders without css.

btw: automatic scrolling back to top, is quite annoying - is there a way to circumvent this?

SunboX commented 12 years ago

maybe smashingmagazine and mashable have defined HTML elements with 10.000 Pixel width or height. This may "crash" your iPad, because it´s runnig out of memory when creating the canvas to render this element. That´s not necessary an image amount problem.

BananaAcid commented 12 years ago

hm - can'T get it to run on my testpage anyways - works in all browsers, except the ios ones.. the demo page still works.. fustrating