Can you show a code snippet on what your are doing? Maybe the screenshot you are having is flash content (which it doesn't currently support)? Maybe the tab is invalid.
-Mohamed Mansour On Sat, Dec 12, 2009 at 4:20 PM, Tom <[email protected]> wrote: > Thanks Mohamed, > > It all seems to be working, how ever the images are appearing blank. > They are 1440x780 and in inspector there are no errors reported. Even > when capturing the current window the images appear blank. > > Tom > > On Dec 12, 8:52 pm, Mohamed Mansour <[email protected]> wrote: > > Hi Tom, > > > > You are placing the wrong thing in the source attribute: > http://code.google.com/chrome/extensions/tabs.html#method-captureVisi... > > > > <http://code.google.com/chrome/extensions/tabs.html#method-captureVisi.. > .>The > > callback function for captureVisibleTab has this defined as: > > "function(string dataUrl) {...})" > > > > You would use the "dataUrl" to assign the 'src' property of an HTML > Image > > element for display. > > > > An example being: > > > > <script> > > chrome.tabs.captureVisibleTab(null, function(dataUrl) { > > content = document.getElementById('screenshots'); > > var image = document.createElement('img'); > > image.setAttribute('src', dataUrl); > > content.appendChild(image);}); > > > > </script> > > > > <span id="screenshots"></span> > > > > -Mohamed Mansour > > > > > > > > On Sat, Dec 12, 2009 at 11:55 AM, Tom <[email protected]> > wrote: > > > Is it supposed to be used like this? > > > > > var visualTab = chrome.tabs.captureVisibleTab(20, function(capture) > > > {});); > > > document.getElementById('content').innerHTML += '<img src="'+visualTab > > > +'" />'; > > > > > Thats what I'm doing at the moment and I can't get it to work. (I'm > > > sure 20 is a valid tab id) > > > > > Please could someone tell me what I'm doing wrong. > > > > > Thanks > > > > > -- > > > > > You received this message because you are subscribed to the Google > Groups > > > "Chromium-extensions" group. > > > To post to this group, send email to > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<chromium-extensions%[email protected]><chromium-extensions%2Bunsu > [email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/chromium-extensions?hl=en. > > -- > > You received this message because you are subscribed to the Google Groups > "Chromium-extensions" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<chromium-extensions%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/chromium-extensions?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.
