ASP Painter
Home
Home
Samples
Samples
Purchase
Purchase
Download
Download
Documentation
Documentation


ASPPainter::Copy Resize Merge::Copy-w-transparent.vbs

							
'============================================================
'Sample Copy-w-transparent.vbs
'============================================================

Dim im
Set im = CreateObject("ASPPainter.Pictures.1")


'Set GIF Image type
'im.SetImageType 3
im.SetFormat 3
'Load the file
im.LoadFile "C:\cat.gif"

im.SetImageIndex 1
'Set Gif image type
'im.SetImageType 3
'Load image from file
im.LoadFile "c:\fish.gif"
h = im.Height
w = im.Width

'Copy image
'im.Copy 0,1,110,85,0,0,w,h
im.ResizeCopy 0,1,120,110,0,0,w/2,h/2,w,h

im.SetImageIndex 0
im.SaveToFile "c:\eat.gif"
im.DestroyAll

Set im = Nothing


Picture 1. eat.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



home samples purchase documentation download