How to Create Webpage Thumbnail with HmlCapture?
Friday, January 18th, 2008There are two successful ways to make html thumbnails — cropping and resizing. HtmlCapture ActiveX provides SetThumbSize() funtion for resizing and SetClipRect() for cropping. You can use either or a combination of both to make the smaller images.
If you want the thumbnail to give an overview of everything in the picture and don’t care much about the detail, use resizing. If you want the thumbnail to give a much better feel for what the full picture contains, use cropping.
Here are two thumbnails of http://www.microsoft.com/ — one of each type.
![]()

The following codes in JScript show how to get the above thumbnails with HtmlCapture component.
//create HtmlCapture
var snap = new ActiveXObject("HtmlCapture.SnapShooter");
snap.SetRenderingEngine("firefox"); //set firefox as default rendering engine
snap.SnapUrl("http://www.microsoft.com/"); //snap it
snap.SetThumbSize(188, 242, true); //save a resized thumbnail image
snap.SaveImage("microsoft.com_thumb.jpg");
snap.SetClipRect(0,0, 188, 242);
snap.SaveImage("microsoft.com_cropping.jpg"); //save a cropped thumbnail image
snap = null; //release the object