ImageMan ActiveX
Using the Effects Control

The ImageMan Special Effects control lets you create slide shows with special transitional effects between images. You can build a playlist which specifies the images to be displayed as well as the effect options programmatically or using our graphical Effects Workshop editor. You can also let your users create their own play lists with the same Effects Workshop editor that you use.

 

A Playlist can be created programmatically using code at runtime as the following code illustrates:

 

FX1.BaseDir = "c:\images" ' Set the base directory of our image files

FX1.GlobalDelay = 1000 ' Set the Global delay to 1 second

FX1.AddImage "c:\images\frame1.gif"

' Use Random values for the effect and a default image delay of zero

FX1.AddImage "c:\images\jpg\508.jpg", Blinds, Down, InPlace_FloatOver, 5, 5, 0

FX1.AddImage "c:\images\jpg\512.jpg", Mosaic, All, 0, 7, 7, 0

' Use Mosaic with 7x7 pixel blocks

' Now lets play it once

FX1.Play -1

' Save the playlist as a file called myplay.pla

FX1.SaveList "c:\myplay.pla"

 

A Playlist can also be created using the Effects Workshop editor which can be invoked at design time by right clicking in the control and selecting the Workshop option or by invoking the Workshop method at design time. See the Using the Special Effects WorkShop topic for information on using the editor.

 

To use a playlist at design time you need to set the BaseDir, Continuous and FixedPalette properties, load the playlist and then invoke the Play method. This code will load a playlist and play it continuously:

 

FX1.Continuous = True

FX1.FixedPalette = True

FX1.LoadList "d:\effects\demo.pla"

' The Play List stores the Base Directory.

FX1.BaseDir = "d:\effects"

' Set the Base Directory after loading the play list when different.

FX1.Play -1

 

This code will load the images and continuously play them until the bCancel parameter of the NewImage event is set to True.

 

The setting of the FixedPalette property can dramatically influence the image display quality. If the images in the list all have different palettes and the system on which the list is being played back doesn't have a true color video driver then there will be palette flicker occurring when each new image is displayed. The solution is to either set the FixedPalette property to a value of true or to reduce all the images ahead of time to use the same palette. Setting the FixedPalette property to True will force the control to automatically color reduce and dither each image in the list to a standard fixed palette in the event the current video mode isn't true color. If the list is being played back on a system, which supports True color, then the system doesn't need to reduce or dither images.

 

 


© 2014 Data Techniques, Inc. All rights reserved.

Submit feedback on this topic