VideoEdit Gold ActiveX Control

AddEffect Method

 

Description

Add effect to timeline and specific the effect id.

 

Syntax

Public Function AddEffect( _
   ByVal iVideoTrack As Integer,
   ByVal iEffectID As Long, _
   ByVal iStart As double, _
   ByVal iStop As double, _
   ByVal strParam1 As String, _
   ByVal strParam2 As String, _
   ByVal strParam3 As String, _
   ByVal strParam4 As String
) As Boolean

 

Parameters

iVideoTrack
   the index of video track, The first video track is 0.

iEffectID
   the Effect ID, Start from 0 -11.

0 - blur

strParam1 = the value of PixelRadius (0.0 to 25)
strParam2 (not used)
strParam3 (not used)
strParam4 (not used)

1 - Brightness

strParam1 = the value of Brightness (-255 to 255)
strParam2 (not used)
strParam3 (not used)
strParam4 (not used)

2 - Fade

strParam1 =  0 or 1 , 0 -fade out , 1= fade in
strParam2 =  The number can be given in hexadecimal or binary. In hexadecimal, the values represent blue, green, and red values as BBGGRR. (. The blue value must be first.) , e.g FF0000 = blue color
strParam3 (not used)
strParam4 (not used)

3 - Film Aging

strParam1 =  the number of years to age the film (0-100)
strParam2 (not used)
strParam3 (not used)
strParam4 (not used)

4 - Filter

strParam1 =  the ID of Filter effect to use

FilterEffectID

Filter name

0

None

1

Accents

2

AngledStrokes

3

BasRelief

4

Mosaic

5

ChalkAndCharcoal

6

Charcoal

7

Chrome

8

ColoredPencil

9

Craquelure

10

Crosshatch

11

Cutout

12

DarkStrokes

13

DiffuseGlow

14

DryBrush

15

Emboss

16

FilmGrain

17

InkOutline

18

NotePaper

19

Fresco

20

GlowingEdges

21

Grain

22

HalftoneScreen

23

Patchwork

24

NeonGlow

25

PaintDaubs

26

PaletteKnife

27

Plaster

28

PlasticWrap

29

PosterEdges

30

Ripple

31

Reticulation

32

SmudgeStick

33

Sponge

34

SprayedStrokes

35

Stamp

36

Photocopy

37

Sumie

38

GraphicPen

39

TornEdges

40

Watercolor

strParam2 = the value of control value 1 for specific filter (0-100)
strParam3 = the value of control value 2 for specific filter (0-100)
strParam4 = the value of control value 3 for specific filter (0-100)

5 - Mirror and Grayscale

strParam1 =  1 or 0 , 1 - flipped horizontally , 0 - no flipped
strParam2 =  1 or 0 , 1 - changed to grayscale, 0 - no change
strParam3 (not used)
strParam4 (not used)

6 - Pixelate

strParam1 = the value of maxsquare (2-50)
strParam2 (not used)
strParam3 (not used)
strParam4 (not used)

7 - Color transform

strParam1 = the name of color effect.

The name of color effect

Default value

Range

Description

Invert

None

0.0 to 1.0

Color inversion produces new color values that are the previous color values subtracted from 255. Only values above the submitted value of the Invert parameter times 255 are inverted.

Red

None

-1.0 to 1.0

Adjusts color balance.

Green

None

-1.0 to 1.0

Adjusts color balance.

Blue

None

-1.0 to 1.0

Adjusts color balance.

Cyan

None

-1.0 to 1.0

Adjusts color balance. Ignored if Red is specified.

Magenta

None

-1.0 to 1.0

Adjusts color balance. Ignored if Green is specified.

Yellow

None

-1.0 to 1.0

Adjusts color balance. Ignored if Blue is specified.

Brightness

None

0.0 to infinity

For brightness adjustment, each color channel value is multiplied by the submitted value.  These values should be greater than or equal to zero and are usually around 1.0.

Contrast

None

0.0 to infinity

Contrast adjustment shifts the range of each color channel around a midpoint. These values should be greater than or equal to zero, and are usually around 1.0.

Posterize

None

0 to 255

This value is the number of color levels that should remain after posterization.

Threshold

None

0.0 to 1.0

For the threshold filtering adjustment, each sample color channel whose value is below the submitted Threshold value times 255 is set to zero. Each color channel with a value equal to or above that threshold is set to 255.

Gamma

None

0.0 to infinity

Gamma correction for pixels.  Less than 1.0 is dimmer, greater than 1.0 is brighter.

ExponentialProgressDuration

0.0

0.0 to 1.0

Length of time, starting from 0.0, during which progress will happen on a logarithmic scale.  Progress is linear after that time.

ExponentialProgressScale

0.3

0.0 to infinity

Scale of the exponential progress. The equation is:  LogrithmicScale = -log(1.0 - LinearProgress ) * ExponentialProgressScale


strParam2 = the value of color effect. Depend on selected color effect.
strParam3 (not used)
strParam4 (not used)

8 - MirrorVertical

strParam1 = true or false , true - Mirror Vertical, false - no change.

9 - rotate 90

strParam1 (not used)
strParam2 (not used)
strParam3 (not used)
strParam4 (not used)

10 - rotate 180

strParam1 (not used)
strParam2 (not used)
strParam3 (not used)
strParam4 (not used)


11 - rotate 270

strParam1 (not used)
strParam2 (not used)
strParam3 (not used)
strParam4 (not used)

Return Value

Return true - successful
Return false - Failed


Example

   

[Visual Basic Syntax]
'add Brightness effect start from 0 to 29 second and set the brightness value to 100
VideoEdit1.InitControl
VideoEdit1.AddVideo "c:\movie\ff9-coke1.mpeg", 0, 29, 0
VideoEdit1.AddAudio "c:\movie\ff9-coke1.mpeg", 0, 29
VideoEdit1.AddEffect 0,1, 0, 29, "100", "", "", ""
VideoEdit1.Preview

'add rotate 90 effect start from 0 to 10 second
VideoEdit1.InitControl
VideoEdit1.AddVideo "c:\test1.mpg", 0, 29, 0
VideoEdit1.AddAudio "c:\test1.mpg", 0, 29
VideoEdit1.AddEffect 0,9, 0, 10, "", "", "", ""
VideoEdit1.Preview

'add rotate 90 effect start from 0 to 10 second and add rotate 180 effect start from 15 to 20 second
VideoEdit1.InitControl
VideoEdit1.AddVideo "c:\test1.mpg", 0, 29, 0
VideoEdit1.AddAudio "c:\test1.mpg", 0, 29
VideoEdit1.AddEffect 0,9, 0, 10, "", "", "", ""
VideoEdit1.AddEffect 0,10, 15, 20, "", "", "", ""
VideoEdit1.Preview

'add water filter effect start from 0 to 10 second and set the control value 1 =9, control value 2= 1, control value 3= 1
VideoEdit1.InitControl
VideoEdit1.AddVideo "c:\test1.mpg", 0, 29, 0
VideoEdit1.AddAudio "c:\test1.mpg", 0, 29
VideoEdit1.AddEffect 0,4, 0, 10, "40", "9", "1", "1"
VideoEdit1.Preview