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


ASPPainter::Copy Resize Merge::Photo.vbs

							
'============================================================
'Sample Photo.vbs
'============================================================


Dim pic

Set pic = CreateObject("ASPPainter.Pictures.1") 

        pic.SetFormat 3 
        pic.LoadFile "C:\cat.gif" 
        h = pic.Height 
        w = pic.Width 
        pic.SaveToFile "C:\copy_cat.gif" 
        pic.SetImageIndex 1 
        pic.Create CInt(w/2),CInt(h/2) 
        pic.SetColor 255,255,255,255

        pic.ResizeCopy 1,0,0,0,0,0,CInt(w/2),CInt(h/2),w,h 
        pic.SaveToFile "C:\thumb_cat.gif" 
        pic.DestroyAll
        Set pic = Nothing    


Picture 1. copy_cat.gif Picture 2. thumb_cat.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