folletto / Blipshot

Google Chrome Extension to make screenshots
intenseminimalism.com
114 stars 19 forks source link

Bug: screenshot maximum height is 32767px (Chrome/Skia bug) #15

Open povbet opened 7 years ago

povbet commented 7 years ago

Hello, Blipshot worked correctly with Chrome 56, but hangs with Chrome 57 (Slimjet 14), on the make icon, for any page lengths Sincerely

folletto commented 7 years ago

Heya, I'm not able to test on Chrome 57 as mine has already updated, but I tried on Chrome 58 and it works. Can you try updating and see what happens? Thanks!

screen shot 2017-05-28 at 13 41 40

a4jp-com commented 7 years ago

I'm on Version 59.0.3071.115 (Official Build) (64-bit) and nothing is happening after the grab.

folletto commented 7 years ago

Can you please refer to which site are you trying on, and if you have errors in the console?

a4jp-com commented 7 years ago

http://www.009.cd2.com/members/how_to/nouaillier_a.htm

Error in event handler for runtime.onMessage: TypeError: Cannot read property '3' of null at dataToBlobURL (chrome-extension://mdaboflcmhejfihjcbmdiebgfchigjcf/screenshotter.DOM.js:187:28) at screenshotReturn (chrome-extension://mdaboflcmhejfihjcbmdiebgfchigjcf/screenshotter.DOM.js:80:19) at chrome-extension://mdaboflcmhejfihjcbmdiebgfchigjcf/screenshotter.DOM.js:121:36

folletto commented 7 years ago

Given the page length my first impression is that it might be a limit of size: Data URL which is used internally has a limit (2Mb apparently).

I'll look into that, thanks!

a4jp-com commented 7 years ago

Great. Thanks for that.

folletto commented 7 years ago

I found the issue: apparently Chrome (Chromium) uses a library named Skia that has a limit on the maximum height and width of images. So the maximum image Chrome's canvas can generate is 32767px.

I introduced a better handling in Blipshot 1.2.1 so at the very least it generates the image up to the limit. It's cut, but at least it's something.

Here the bug on Chromium ⌗339725 (closed as wontfix)

Here the bug on Skia ⌗2122 (since 2014)


I'll keep the issue open to keep an eye on it, even if it's outside what I can do.

a4jp-com commented 7 years ago

Anything to either fix the bug or make everything work is cool. Thanks for checking up on everything.

folletto commented 7 years ago

I sample checked also other full-page screenshot extensions and they all have the same issue: they break at 32k pixels.

If you happen to find one that doesn't, let me know. :)

Until then, we can just hope that someone in Google fixes it. Even if seems unlikely given it's open since 2014 and buried deep in the Skia library, while closed in Chromium. :(