Tonec.com Bringing Internet Technology Innovations to Market since 1991
  News Products Outsourcing About Us Contact Us
what's new?what's new? featuresfeatures samplessamples manualmanual downloaddownload buybuy
  Tonec Homepage
ProductsActive Imagesamples

Please view complete list of samples

Sample 2


Saving/Reading image to/from 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:\counter.jpg"
im.SetImageType 0
im.WriteToFile "C:\counter.png"
im.DestroyImage
Set im = Nothing


counter.jpg counter.png
Picture 1. counter.jpg (size - 4.5 Kb) Picture 2. counter.png (size - 2 Kb)

Next sample >> 

If you have any questions or bug reports, write to support@tonec.com for technical support.

  TonecPrivacy Policy
  © 1999-2005. Tonec, Inc. All rights reserved.