 
            :
The sample source codes on this page will demonstrate you how to make pan and zoom effects in VBScript. ByteScout Image To Video SDK helps with pan and zoom effects in VBScript. ByteScout Image To Video SDK is the SDK that is designed to generate video slideshow with 100+ 2d and 3D transition effects. Can generate WMV, AVI, WEBM video file with adjustable quality, framerate, output video size.
Fast application programming interfaces of ByteScout Image To Video SDK for VBScript plus the instruction and the VBScript code below will help you quickly learn pan and zoom effects. VBScript sample code is all you need: copy and paste the code to your VBScript application’s code editor, add a reference to ByteScout Image To Video SDK (if you haven’t added yet) and you are ready to go! Enjoy writing a code with ready-to-use sample VBScript codes to implement pan and zoom effects using ByteScout Image To Video SDK.
On our website you may get trial version of ByteScout Image To Video SDK for free. Source code samples are included to help you with your VBScript application.
  On-demand (REST Web API) version: 
   Web API (on-demand version)
  
  On-premise offline SDK for Windows: 
   60 Day Free Trial (on-premise)
      ' Create an instance of BytescoutImageToVideo.ImageToVideo ActiveX object
Set converter = CreateObject("BytescoutImageToVideo.ImageToVideo")
' Activate the component
converter.RegistrationName = "demo"
converter.RegistrationKey = "demo"
' set default in effect for slides (you can also set effects for each single slide)
converter.Slides.DefaultSlideInEffect = 0 ' default effect
converter.Slides.DefaultSlideInEffectDuration = 1000 ' 1000 msec for slide transition effect effect
converter.Slides.DefaultSlideDuration = 2000 ' total duration is 2000 = slide transition (1000 ms) + 1000 ms of slide it self (with pan and zoom effect applied)
' uncomment to use background picture
' converter.SetBackgroundPictureFileName "..\..\background.jpg"
' apply transition effect to the very first slide
converter.UseInEffectForFirstSlide = false
Randomize ' initialize random values generator 
bChangeSlide = True ' temporary variable to change slides
' now try all 12 pan zoom effects for slides from 1 to 12
' list of PanZoom effects (Slide.PanZoomEffect property)
'   pzeNone = 0, // default
'	pzeMoveCamFromLeftTopToRightTop = 1,
'	pzeMoveCamFromRightTopToLeftTop = 2,
'
'	pzeMoveCamFromLeftTopToRightBottom = 3,
'	pzeMoveCamFromRightBottomToLeftTop = 4,
'
'	pzeMoveCamFromLeftCenterToRightCenter = 5,
'	pzeMoveCamFromRightCenterToLeftCenter = 6,
'
'	pzeMoveCamFromLeftBottomToRightBottom = 7,
'	pzeMoveCamFromRightBottomToLeftBottom = 8,
'
'	pzeMoveCamFromCenterTopToCenterBottom = 9,
'	pzeMoveCamFromCenterBottomToCenterTop = 10,
'
'	pzeMoveCamFromLeftBottomToRightTop = 11,
'	pzeMoveCamFromRightTopToLeftBottom = 12,
for i=1 to 11
' Add slide image, set the duration
if not bChangeSlide then
	Set slide = converter.AddImageFromFileName("koala.jpg")
Else 
	Set slide = converter.AddImageFromFileName("penguins.jpg")
End If
bChangeSlide = not bChangeSlide ' switch to use another slide next tim
slide.Duration = 2000 ' 2 seconds (2000 ms)
slide.InEffect = Rnd * 100 + 1' set random slide transition effect
Slide.InEffectDuration = 1000 ' 1000 ms for slide transition effect
slide.PanZoomEffect = i ' set panzoom effect will be shown on whole slide duration (2000 ms)
Next
' Set output video size
converter.OutputWidth = 640
converter.OutputHeight = 480
' Set output video file name
converter.OutputVideoFileName = "PanZoomEffects.wmv"
' Run the conversion
converter.RunAndWait()
MsgBox "Done! See PanZoomEffects.wmv"
Set converter = Nothing
' Open the output file in default app
Set shell = CreateObject("WScript.Shell")
shell.Run "PanZoomEffects.wmv", 1, false
Set shell = Nothing
    
    60 Day Free Trial or Visit ByteScout Image To Video SDK Home Page
    
    Explore ByteScout Image To Video SDK Documentation
    
    Explore Samples
    
    Sign Up for ByteScout Image To Video SDK Online Training
    Get Your API Key
    
    Explore Web API Docs
    
    Explore Web API Samples    
60 Day Free Trial or Visit ByteScout Image To Video SDK Home Page
Explore ByteScout Image To Video SDK Documentation
Explore Samples
Sign Up for ByteScout Image To Video SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples