ASPPainter::Copy Resize Merge::MergeCat.vbs
Dim pic
Set pic = CreateObject("ASPPainter.Pictures.1")
'Set GIF Image type
pic.SetFormat 3
'Load the file
pic.LoadFile "C:\cat.gif"
pic.SetImageIndex 1
'Set Gif image type
'Load image from file
pic.LoadFile "c:\fish.gif"
h = pic.Height
w = pic.Width
'Copy image
pic.Merge 0,1,110,85,0,0,w,h,50
pic.SetImageIndex 0
r = pic.GetPixelRed(1,1)
g = pic.GetPixelGreen(1,1)
b = pic.GetPixelBlue(1,1)
pic.SetColor r,g,b,255
pic.setColorAsTransparent
pic.SaveToFile "c:\mcat.gif"
pic.DestroyAll
Set pic = Nothing
 |
Picture 1. mcat.gif |
More samples:
Cat,
Copy, Copy_with_transparent,
Files,
Photo, Merge,
Merge cat, Resize,
Resize photo
See also:
SetFormat,
LoadFile, Width,
Height, Copy,
SetImageIndex, GetPixelAlpha,
GetPixelBlue,
GetPixelGreen, GetPixelRed,
SetColor,
SetColorAsTransparent,
SaveToFile, DestroyALL