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


ASPPainter::Copy Resize Merge::ResizePhoto.vbs

							
'============================================================
'Sample ResizePhoto.vbs
'============================================================

Dim pic
Set pic = CreateObject("ASPPainter.Pictures.1")
pic.LoadFile "c:\flower.jpg"

pic.SetImageIndex 1
pic.loadfile "c:\fish.gif"
h = pic.Height
w = pic.Width
msgbox h & "  " & w

pic.SetImageIndex 0
pic.ResizeCopy 0,1,50,0,0,0, w/2,h/2,w,h
'pic.ResizeCopy 0,1,50,0,0,0, w,h,w,h
pic.SetFormat 3
pic.SaveToFile "C:\resize_fish.gif"
pic.Destroy

Set pic = Nothing


Picture 1. flower.jpg Picture 2. fish.gif Picture 3. resize_fish.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