ASPPainter Samples
Sample 5 - Merge 2 images.
Filled rectangles, copying images
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
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
 |
 |
 |
Figure 1. cat.gif(size - 4.4 Kb) |
Figure 2. fish.gif (size - 2.4 Kb) |
Figure 3. CatAndFish.gif (size - 6.1 Kb) |