webpage-screenshot

HTML2canvas and Canvas2image, downloaded screenshot doesn't show my HTML images

情到浓时终转凉″ 提交于 2019-12-21 06:04:02
问题 I've been working on a HTML page that I want to convert into an image. I have been using the html2canvas and canvas2image scripts and taken this code http://jsfiddle.net/8ypxW/3/ here that has allowed me to create a button that will take a screenshot and download my HTML page as an image. The problem I'm having is that my downloaded screenshot image shows my text but not my image, even though they are from the same origin. I'm not sure if it's a problem with my HTML, HTML2canvas or

HTML2canvas and Canvas2image, downloaded screenshot doesn't show my HTML images

我只是一个虾纸丫 提交于 2019-12-21 06:03:13
问题 I've been working on a HTML page that I want to convert into an image. I have been using the html2canvas and canvas2image scripts and taken this code http://jsfiddle.net/8ypxW/3/ here that has allowed me to create a button that will take a screenshot and download my HTML page as an image. The problem I'm having is that my downloaded screenshot image shows my text but not my image, even though they are from the same origin. I'm not sure if it's a problem with my HTML, HTML2canvas or

How do Google and Facebook implement and create the preview link functionality?

て烟熏妆下的殇ゞ 提交于 2019-12-21 05:47:28
问题 Google, Facebook and some others now have a preview link functionality where you can view a "screenshot" of say a website's home page. Are there any suggestions how I can achieve this? Specifically I'd like to be able to grab a screenshot (a la iPhone screen shot) and make it available as an image such as a jpg or png. I want to do this from python if possible. 回答1: We're using the service Bluga, it's not too expansive and is pretty easy to implement. If you don't like that there are many

Can I create high resolution screenshots in Firefox?

試著忘記壹切 提交于 2019-12-20 12:11:29
问题 In Firefox I can create a fullpage screenshot when I go to the web developer toolbar (can be activated in the developer tool settings). Unfortunately, I can do this only with the default resolution. Is there a chance to get images of higher resolution anyhow? With Firefox or an add-on? Or is it possible in another browser? 回答1: Firefox 62 and following In Firefox 62 and following, the GCLI was removed and the screenshot command was moved to the Web Console and prefixed with a colon. To take a

Can I create high resolution screenshots in Firefox?

隐身守侯 提交于 2019-12-20 12:10:14
问题 In Firefox I can create a fullpage screenshot when I go to the web developer toolbar (can be activated in the developer tool settings). Unfortunately, I can do this only with the default resolution. Is there a chance to get images of higher resolution anyhow? With Firefox or an add-on? Or is it possible in another browser? 回答1: Firefox 62 and following In Firefox 62 and following, the GCLI was removed and the screenshot command was moved to the Web Console and prefixed with a colon. To take a

How do I capture a screenshot if my nosetests fail?

荒凉一梦 提交于 2019-12-18 03:41:16
问题 I am running selenium webdriver tests with nosetests. I want to capture a screenshot whenever nosetests fail. How can I do it in the most effective way, either by using webdriver, python or nosetests features? 回答1: My solution import sys, unittest from datetime import datetime class TestCase(unittest.TestCase): def setUp(self): some_code def test_case(self): blah-blah-blah def tearDown(self): if sys.exc_info()[0]: # Returns the info of exception being handled fail_url = self.driver.current

How do I capture a screenshot if my nosetests fail?

南笙酒味 提交于 2019-12-18 03:41:15
问题 I am running selenium webdriver tests with nosetests. I want to capture a screenshot whenever nosetests fail. How can I do it in the most effective way, either by using webdriver, python or nosetests features? 回答1: My solution import sys, unittest from datetime import datetime class TestCase(unittest.TestCase): def setUp(self): some_code def test_case(self): blah-blah-blah def tearDown(self): if sys.exc_info()[0]: # Returns the info of exception being handled fail_url = self.driver.current

Why does view.layer.renderInContext() take higher amount of temporary memory for same size screenshot

偶尔善良 提交于 2019-12-12 05:53:39
问题 I am trying to take a screenshot of webView of fixed size and fixed height. The web view can render any webSite . I notice that depending on the website that is rendering the temporary memory used by the webView.layer.renderInContext is way higher. My understanding is that the renderInContext first generates the screenshot in bitmap and I thought bitmap should always be of same size when the screenshot height and weight are same irrespective of the content. Is my understanding incorrect? The

How to create an image of the website using js?

我与影子孤独终老i 提交于 2019-12-11 06:39:43
问题 Can I "convert" the website to a JPG or GIF? I mean, is it possible to view the website as an image? (obviously without animation) only a static image, like a photo of the website that the user is seeing on the browser... Thank you! 回答1: No it is not possible, since the way the website looks is just how a browser renders it, it can be different sizes and there are many variables to the way your page looks. You can do it server-side using PHP but it won't be simple at all, it would mean your

GeckoFX WebBrowser page height and width

让人想犯罪 __ 提交于 2019-12-11 00:00:21
问题 Does anyone know how I get the full page height and width in GeckoFX? In the IE WebBrowser object, I can look at WebBrowser.Document.Body.ScrollRectangle. (The objective here is to take a screenshot of the entire page) Thanks! 回答1: I'm using Hindle's fork of GeckoFX, and here's how I do it: var width = _browser.Document.ActiveElement.ScrollWidth; var height = _browser.Document.ActiveElement.ScrollHeight; I use this to create thumbnails of the page. Note, this gives us the size taken up by the