How can I change the size of a tab captured with chrome.tabs.captureVisibleTab (Chrome extension)?

The Chrome API doesn't actually provide image sizing of the captureVisibleTab What that function does, is basically whatever you see is what you get as an image from that tab If you want to resize the image for that tab. You can use HTML5 Canvas whatwg.org/specs/web-apps/current-work/m... You can load the image into a Canvas, and from that canvas, you can resize the image and do whatever you wish with it. You can place the image into the canvas context using drawImage whatwg.org/specs/web-apps/current-work/m...#images Depending on the arguments of drawImage, you can resize it, or you can use other canvas features to clip or crop Then once your done resizing your image, you can use the toDataURL to convert it back so you can use it or store it whatwg.org/specs/web-apps/current-work/m...#dom-canvas-todataurl.

The Chrome API doesn't actually provide image sizing of the captureVisibleTab. What that function does, is basically whatever you see is what you get as an image from that tab. If you want to resize the image for that tab.

You can use HTML5 Canvas. whatwg.org/specs/web-apps/current-work/m... You can load the image into a Canvas, and from that canvas, you can resize the image and do whatever you wish with it. You can place the image into the canvas context using drawImage whatwg.org/specs/web-apps/current-work/m...#images Depending on the arguments of drawImage, you can resize it, or you can use other canvas features to clip or crop.

Then once your done resizing your image, you can use the toDataURL to convert it back so you can use it or store it. whatwg.org/specs/web-apps/current-work/m...#dom-canvas-todataurl.

Thanks Mohamed, What does the "quality" parameter do then, it looks like the thing I need to set but I don't know how to do it. – Tom Aug 20 '10 at 18:37 I the quality is from 1 to 100 since it is an integer. It is an optional field, but if you want to create thumbnails, it would be great to control the quality with that property since it is done in C++ and resize it using Canvas.

There is another question on Stacked Overflow on how to resize images with Quality using Canvas. But I recommend using Chrome's extension API to reduce quality and use Canvas to resize: stackoverflow. Com/questions/2303690/… – Mohamed Mansour Aug 20 '10 at 20:04.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions