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 4


Filling image with a custom color, getting image information, drawing lines with a selected thickness


Set line thickness and fill it.
    Get image information.

fill.vbs

Function DrawComments(im,x,y)
im.DrawText x,y, "Red = " & im.GetPixelRed(x,y) & " Green = " & im.GetPixelGreen(x,y) & " Blue = " & im.GetPixelBlue(x,y)
end function

Dim im
Set im = CreateObject("ActiveImage.Images.1")
im.CreateImage 250,150
im.SetColor 255,0,0
im.Fill 10,10
im.SetLineThickness 50
im.SetColor 129,129,129
im.DrawLine 0,75,250,75
im.SetColor 0,0,255
im.Fill 10,130
im.SetColor 255,255,255
Call DrawComments(im,10,25)
Call DrawComments(im,10,65)
Call DrawComments(im,10,115)

im.WriteToFile "C:\fill.png"
im.SetImageType 1
im.SetJpegQuality 100
im.WriteToFile "C:\fill.jpg"
im.DestroyImage
Set im = Nothing

 fill.jpg fill.png
 Picture 1. fill.jpg (size - 18 Kb) Picture 2. fill.png (size - 1.5 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.