ASPPainter::Blend::BlendingImageSample.vbs
'============================================================
Set im = CreateObject("ASPPainter.Pictures.1")
width = 100
height = 100
im.SetImageIndex 0
im.SetBKColor 255,255,255,255
im.Create width, height
im.SetColor 127,127,127,255
im.SetColorIndex 1
im.SetColor 127,127,255,255
im.SetGradient 0,0, width,height
im.DrawFilledRectangle 0,0,width,height
im.SetImageIndex 1
im.LoadFile "C:\blend.png"
' Set Blending
im.SetBlendingMode 1
im.SetBlendingQuality 3
im.BlendImage 0,1,0,0,0,0,width,height
im.SetImageIndex 0
im.SetFormat 1
im.SaveToFile "c:\blendimage.jpg"
'Copy
im.SetImageIndex 2
im.SetBKColor 255,255,255,255
im.Create width, height
im.SetColor 127,127,127,255
im.SetColorIndex 1
im.SetColor 127,127,255,255
im.SetGradient 0,0, width, height
im.DrawFilledRectangle 0,0, width, height
im.SetImageIndex 3
im.LoadFile "C:\blend.png"
im.Copy 2,3,0,0,0,0,width,height
im.SetImageIndex 2
im.SaveToFile "c:\copyimage.jpg"
im.Destroy
im.SetImageIndex 1
im.Destroy
im.SetImageIndex 2
im.Destroy
im.SetImageIndex 3
im.Destroy
im.DestroyAll
Set im = nothing
 |
 |
 |
Picture 1.
blend.png |
Picture 2.
blendimage.jpg |
Picture 3.
copyimage.jpg |
More samples:
Arc,
Beziers, Circle,
Ellipse,
Line, Pie,
Rectangle, Unclosed
polygon
See also:
SetHTMLColor,
SetBKColor, Create,
SetColor ,
SetLineWidth , DrawArc
, DrawFilledRectangle
, DrawBezier ,
DrawCircle , DrawFilledCircle
, DrawEllipse ,
DrawFilledEllipse ,
DrawRectangle ,
DrawUnclosedPolygon , SaveToFile
, DestroyALL