take screen shot using only js in firefox extension

I am thinking of building a firefox extension. This extension requires the ability of performing screen shots. Is it possible doing so only using javascript?

-------------Problems Reply------------

If you mean a screenshot of firefox's window, yes, and it's so easy it hurts. You have to render it into a canvas. See https://developer.mozilla.org/en/drawing_graphics_with_canvas#Rendering_Web_Content_Into_A_Canvas

<canvas id='my-canvas'></canvas>
<script>
var canvas = document.getElementById('my-canvas');
var ctx = canvas.getContext("2d");
// Draw the window at the top left of canvas, width=100, height=200, white background
ctx.drawWindow(window, 0,0, 100, 200, "rgb(255,255,255)");
// Open another window with the thumbnail as an image
open(canvas.toDataURL("image/png"));
</script>

If you mean a screenshot of the entire desktop, I don't think so

Category:javascript Views:0 Time:2011-01-19

Related post

  • Can I create a Chrome extension or a Firefox plugin that take screen shots of web pages? 2012-02-19

    I am a web developer/aspiring web designer who looks at a lot of web design examples. While I bookmark them, text links are a pretty bad way for me to keep track of designs I like. I am planning to create my own bookmarking application which would us

  • How to take screen shots from various browsers on a local machine for web development? 2009-08-03

    I'm looking for a program that has similar functionality to this. It's basically a service that takes snap shots or screen shots of a web page. I need one that runs local for my development behind a corporate firewall. Ideally, it would take screensh

  • Screen shot software 2011-04-15

    Ok guys, My work, when we need to send sites to review and editorial requires screenshots. we often need to screen shot entire websites and print them. it's a real pain in the butt especially when they make one change and want all new screenshots. ri

  • What are strategies to construct reusable Sikuli screen shot libraries? 2012-03-09

    I would like to use Sikuli to automate both GUI apps and Web apps running within browser on Mac OS X and Windows. My purpose is currently less for testing, and more for GUI automation of tedious, repetitive tasks for a team that unfortunately doesn't

  • No URL display from screen shot clip in OneNote 2007 2013-07-22

    Why would OneNote 2007 (Vista) stop displaying the URL link from a screen shot? I ran the OneNote repair which fixed the 'Send to One Note' printer but new problems have started. One is the URL link from a screen shot and another is the OneNote icon

  • How to post screen shots (no longer works?) 2014-02-15

    I can no longer post screen shots. But I know that others can as recently as Dec 7 [2]. What am I doing wrong? I uploaded a file to Skydrive on Nov 24 (click here). It is a BMP file [3]. Following instructions from Jeeped and Ron, I click on the file

  • how do I take a screen shot 2014-10-15

    Okay so how do I take a screen shot and print the image? I don't understand how to do that. thank you for helping me out. [New question split by moderator] --------------Solutions------------- Shift-Command-3 takes the full screen Shift-Command-4 the

  • Taking reliable screenshots of websites? Phantomjs and Casperjs both return empty screen shots on some websites 2014-10-22

    Open a web page and take a screenshot. Using ONLY phantomjs: (this is a simple script, in fact it is the example script used in their docs. http://phantomjs.org/screen-capture.html var page = require('webpage').create(); page.open('http://github.com/

  • Screen shots 2014-12-24

    I published my site with the !doctype (main page only so far contains it). I tested on browsershots.org and it some screen shots are crazy. I tested it prior to adding the !doc and everything looked good. Any idea what has caused this? www.atlasroofi

  • Does anyone know of a GUI-less application that can be called from JavaScript to create and save desktop screen shots? 2008-12-31

    While the subject could sound like I'm looking to do something shifty, I'm not; I maintain an internal web site used by several hundred phone operators, and would like to add the following functionality: I would like to add a control in the header of

  • Question regarding a memory leak (screen shot from Instruments included) 2009-02-26

    I'm trying to weed my application out of memory leaks. The problem I'm facing is that Instruments is reporting leaks for objects which I have not explicitly allocated myself. Now, I do understand that these objects might be instantiated as a result o

  • How can I programmatically create a screen shot of a given Web site? 2009-04-17

    I want to be able to create a screen shot of a given Web site, but the Web site may be larger than can be viewed on the screen. Is there a way I can do this? Goal is to do this with .NET in C# in a WinForms application. --------------Solutions-------

  • Creating screen shots for app submission. 2009-04-25

    When submitting screen grabs for an iPhone app during the approval process, is it ok to submit screens that are different than what is represented on the app itself? For example, I want to submit a screen where I explain some of the features of the a

  • How to take screen shot of an email inside "apple mail" and "entourage" in Mac OS X? 2009-05-04

    I want to write an AppleScript or Cocoa application in Mac OS X which will take screen shot of the email inside AppleMail and Microsoft Entourage. I did this by writing a simple AppleScript code but it takes the screen shot of the page. If email is a

  • take screen shots from a flv video 2009-09-10

    I am working on a videos sharing web site and I want to take screen shot from a flv video file from a another website like youtube. I am using PHP but i have no idea how to do it. any guidance is appreciated. --------------Solutions------------- Ther

  • Obtaining a screen shot of an Applet? 2009-10-03

    Given an Applet object, is it possible to programatically obtain a "screen shot" of the applet window (represented as say a BufferedImage)? JApplet applet = this; // ... code here ... BufferedImage screenshotOfApplet = ...; --------------Solutions---

  • How can I take a screen shot and display it in VC++? 2009-10-07

    I want to make a screen shot and display it in the window of my program, but so far I have only been able to make the screen white. What am I doing wrong? Code: #include <windows.h> LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ; int WI

  • Capture screen shot with mouse cursor 2009-10-27

    I have used the following code to get screen shot on Windows. hdcMem = CreateCompatibleDC (hdc) ; int cx = GetDeviceCaps (hdc, HORZRES); int cy = GetDeviceCaps (hdc, VERTRES); HBITMAP hBitmap(NULL); hBitmap = CreateCompatibleBitmap (hdc, cx, cy) ; Se

  • Taking a Screen Shot of an Embedded Linux Framebuffer 2009-10-29

    I'm running Embedded Linux on an evaluation kit (Zoom OMAP35x Torpedo Development Kit). The board has an LCD and I would like to be able to take screen shots convert them into a gif or png. I can get the raw data by doing the following: "cp /dev/fb0

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.121 (s). 11 q(s)