Sample 2 - Saving/Reading image to/from script variable Saving image in script variable
> Counter.vbs
> Dim im Set im = CreateObject("ActiveImage.Images.1") im.CreateImage 100,25 im.SetColor 255,255,255 im.Fill 0,0 im.SetColor 0,0,255 im.DrawText 10,3, CInt(100*RND) & " visitors" im.SetImageType 1 im.SetJpegQuality 99 str = im.WriteToVariable im.ReadFromVariable(str) im.DrawText 10,12, Now() im.WriteToFile "C:\AI\counter.jpg" im.SetImageType 0 im.WriteToFile "C:\AI\counter.png" im.DestroyImage Set im = Nothing
> Picture 1. counter.jpg (size - 4.5 Kb) | Picture 2. counter.png (size - 2 Kb)
If you have any questions or bug reports, write to active.image@tonec.com for technical support.