Sample 23 - Converting images from one image format to another. The sample shows how to convert JPEG images to GIF images. The sample uses new ConvertToPaletteNoAlpha method that allows most accurate color conversion despite decreasing color depth from 4294967296 to 256 colors.
> jpgtogif.vbs
>     Dim im, rs
>     Set im = CreateObject("ActiveImage.Images.1")
>     im.SetImageType 1
>     im.ReadFromFile "C:\AI\rose.jpg"
>     im.SetImageType 3
>     im.ConvertToPaletteNoAlpha
>     im.WriteToFile "C:\AI\noalpha.gif"
>     im.DestroyImage

>     Set im = Nothing
> Picture 1. rose.jpg (size - 6,3Kb) | Picture 1. noalpha.gif(size - 21,4Kb)
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