views:

397

answers:

1

Hi, I asked this question earlier, since i am a little new to firefox extension development, the canvas thing for firefox went a little over my head. Apologies for reposting this again.

  1. with the first answer there was this code snippet:

    var path = this.getPref("path","string");

what are the path and string? yes i did look up for getPref in MDC but it made a little sense. Does Path refer to the URL of the web page that i am rendering(e.g: http://en.wikipedia.org/) and what does "String" refer to? I know i might sound a little stupid but it seriously went over my head.

  1. After the images of the web pages are rendered, where are they saved? How do i know if the image has been rendered?

  2. With the draw window if i have framed the browser will it be window.frames[0] in place of content

    context.drawWindow( content,0,0,canvas.height,canvas.width,"rgb(255,255,255)" );

A little more help please!

A: 

getPref is not a standard javascript function but perhaps it does something like this. Would be great if you post that "code snippet".

// getPref
// Syntax: "?width=80&height=25".getPref("width"); // Returns 80
String.prototype.getPref = function(s, splitter) {
  return this.split(s+"=")[1].split((splitter||"7"))[0];
};

After the images of the web pages are rendered, where are they saved?

Browser's cache?

How do i know if the image has been rendered?

look at img.complete

With the draw window if i have framed the browser will it be window.frames[0] in place of content context.drawWindow( content,0,0,canvas.height,canvas.width,"rgb(255,255,255)");

what?

Pedro Ladaria
if i ahve framed my browser with an extension, is there someway i can capture the screenshot of the webpage in one particular frame? Did i make sense?
fftoolbar
And when i scale the image captured, is there someway i can retain the quality of the image, because when i scale the image to a thumbnail size it becomes bit blury?
fftoolbar
1) you can capture any website, just use the url of the iframe2) use a sharpen filter
Pedro Ladaria