Sample 15 - Creating Thumbnails Creating thumbnails
> ThumbnailGif.vbs
>     Dim im
>     Set im = CreateObject("ActiveImage.Images.1")
>     im.SetImageType 3
>     im.ReadFromFile "C:/diagram.gif"
>     h = im.GetHeight
>     w = im.GetWidth
>     im.SetImage 1
>     im.CreateImagePalette CInt(w/2),CInt(h/2)
>     im.CopyImageResize 1,0,0,0,0,0,CInt(w/2),CInt(h/2),w,h
>     im.WriteToFile "C:/thumbnailgif.gif"
>     im.DestroyImage
>     im.SetImage 0
>     im.DestroyImage
>     Set im = Nothing
> Picture 1. diagram.gif (300x300 pixels, size - 7 Kb) | Picture 2. ThumbnailGif.gif (150x150 pixels, size - 2 Kb)
If you have any questions or bug reports, write to active.image@tonec.com for technical support.
| © 2000-2001 All Rights Reserved Tonec Inc., 16835 Algonquin Street #400, Huntington Beach, CA, 92649, fax: (509) 752-1450, e-mail: info@tonec.com