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:\AI\fill.png" im.SetImageType 1 im.SetJpegQuality 100 im.WriteToFile "C:\AI\fill.jpg" im.DestroyImage Set im = Nothing
> Picture 1. fill.jpg (size - 18 Kb) | Picture 2. fill.png (size - 1.5 Kb)
If you have any questions or bug reports, write to active.image@tonec.com for technical support.