Sample 18 - Rotate Image. Rotate image
> Rotate.vbs
>     Dim im
>     Set im = CreateObject("ActiveImage.Images.1")
>     im.SetImageType 1
>     im.ReadFromFile "C:\AI\rose.jpg"
>     h = im.GetHeight
>     w = im.GetWidth

>     im.SetColor 255,255,0

>     im.CopyImageRotate 1,0,45
>     im.SetImage 1
>     im.SetImageType 0
>     im.WriteToFile "C:\AI\rrose.png"
>     im.SetImageType 1
>     im.SetJpegQuality 100
>     im.WriteToFile "C:\AI\rrose.jpg"
>     im.SetImageType 4
>     im.WriteToFile "C:\AI\rrose.bmp"
>     im.SetImageType 3
>     'im.ConvertToPalette
>     im.WriteToFile "C:\AI\rrose.gif"
>     im.DestroyAll

>     Set im = Nothing
> SimpleRotate.vbs
>     Dim im
>     Set im = CreateObject("ActiveImage.Images.1")
>     im.Setimage 0
>     im.SetImageType 1
>     im.ReadFromFile "C:\AI\rose.jpg"

>         h    = im.GetHeight
>         w    = im.GetWidth

>         im.SetImage 1
>         im.CreateImage w,h
>         im.SetColor 255,0,0
>         im.Fill 0,0

>         im.CopyImageSimpleRotate 1,0,w/2,h/2,0,0,w,h,-0
>         im.SetImageType 1
>         im.SetJpegQuality 90
>         im.WriteToFile "C:\AI\simplerotate.jpg"
>         im.DestroyImage

>     Set im = Nothing
> Picture 1. rrose.jpg (size - 10 Kb) | Picture 2. simplerotate.jpg (size - 11 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