When I try to take a screenshot of an element using webkit2png, if the element uses webkit-transform, often the screenshot will be blank.
This is for a research project, where I’m trying to take a thumbnail of google streetview so I can quickly scan which location I need to adjust. Note: We have a special ToS from google for this project (so please don’t flame me for breaking their public ToS).
This is the github of the webkit2png source: https://github.com/paulhammond/webkit2png/issues/?sort=created&direction=desc&_pjax=true&state=open
The issue is open.
Any ideas how to fix this?
I was using bitpixels.com but their service is lacking. This will be running on a server that I work on everyday, so the other option is to use PyQt4, but I have issues with that spawning an x11 instance every shot it needs to take. That won’t scale.
Currently I’m rebuilding and updated version of webkit, trying to write some code that will remove the transform, but I wonder if this will screw things up.
After that, I’m out of ideas.
Answer submitted on github by https://github.com/Wevah
If you can drop support for OS X < 10.4, you can replace
with
This works, at least, with the URL posted in the original issue. Alternatively, you could wrap this stuff in respondsToSelector_(), but I don’t know how the Python/Cocoa stuff deals with weak linking issues.