Groups | Blog | Home
all groups > dotnet drawing api > july 2003 >

dotnet drawing api : www address to jpg



ph-enom
7/29/2003 11:19:35 PM
I need to make a component tha would look up an www
address and create a image file of that web page.

For example:
Input: www.gotdotnet.com
Output: a printscreen .jpg file of this web page.

Has anyone any ideas?
ph-enom
7/30/2003 5:46:24 AM
thanks :)
Im just curious, how is such a component made?

[quoted text, click to view]
Anton Deve
7/30/2003 3:59:04 PM
Hi,

The component that makes HTTP queries, converts web pages to bitmap on =
the
fly and makes thumbnails can be downloaded here:

http://www.tonec.com/download5.html

Dim wss
Set wss =3D CreateObject("WebPageSnapshot.Snapshot.1")
url =3D "http://www.gotdotnet.com"
file =3D "C:\gotdotnet.jpeg"
width =3D 0
height =3D 0

wss.ShowImage 1
wss.SetCacheMode 1
wss.GetWebPage width,height, url

newWidth =3D wss.GetRealWidth/8
newHeight =3D wss.GetRealHeight/8

wss.SetThumbnailSize newWidth, newHeight
wss.SaveAsJpeg file

wss.Clear
Set wss =3D Nothing =20



Anton Deve
Tonec Inc.

"ph-enom" <ph-enom@obmocje51.net>=20
[quoted text, click to view]
phoenix
7/31/2003 12:50:30 AM

"ph-enom" <ph-enom@obmocje51.net> schreef in bericht
news:086b01c35662$8c184390$a401280a@phx.gbl...
[quoted text, click to view]

I never tried it but I would do the following :

1)display a webpage in a browsercontrol
2)use bitblt api to capture it (so you should see it for a second which is
not an ideal solution)
3)save the image

Yves

AddThis Social Bookmark Button