TIEMultiBitmap.InsertTransitionFrames
Declaration
// Standard transition overload
procedure InsertTransitionFrames(Idx: integer; FrameCount: integer; Effect: TIETransitionType;
iWidth: Integer = -1; iHeight: Integer = -1; BackgroundColor: TColor = clBlack;
ResamplingFilter: TResampleFilter = rfFastLinear; Params: TIETransitionParams = nil); overload;
// Pan-Zoom overloads
procedure InsertTransitionFrames(Idx: Integer; FrameCount: Integer; Effect: TIETransitionType;
StartRect, EndRect: TRect; RectMaintainAspectRatio: boolean = True;
iWidth: Integer = -1; iHeight: Integer = -1; bStretchSmall: Boolean = False;
BackgroundColor: TColor = clBlack; ResamplingFilter: TResampleFilter = rfFastLinear;
Smoothing: Integer = 255; Timing: TIETransitionTiming = iettLinear); overload;
procedure InsertTransitionFrames(Idx: Integer; FrameCount: Integer; Effect: TIETransitionType;
StartRect, EndRect: TRect; RectMaintainAspectRatio: boolean;
iWidth, iHeight: Integer; bStretchSmall: Boolean;
BackgroundColor: TColor; ResamplingFilter: TResampleFilter;
Params: TIETransitionParams); overload;
Description
Create a series of transition frames from the image at
Idx - 1 to the image at
Idx (and insert them at position
Idx). If
Idx = 0 then the transition is from a blank frame to the first image. If
Idx = Count then the transition is from the last image to a blank frame.
The second overload is primarily used when you need to create a series of frames that show a Pan-Zoom from
StartRect to
EndRect for the image specified at
Idx - 1.
Standard Transition Overload:
Parameter | Description |
Idx | The insertion position |
FrameCount | The number of frames to insert |
Effect | The desired transition effect |
iWidth, iHeight | The size to create the transition bitmaps. If either of these are -1 then the size will be the larger of the two images in each dimension. Aspect Ratios will be maintained and any non-image area will be filled with BackgroundColor |
BackgroundColor | The color that will be used for blank frames or non-image area (default is clBlack) |
ResamplingFilter | The algorithm that is used to improve quality when resizing the source images |
Params | Extra transition properties |
Pan-Zoom Overloads:
Parameter | Description |
Idx | The insertion position |
FrameCount | The number of frames to insert |
Effect | The desired transition effect |
StartRect | When using an iettPanZoom effect this is the portion of the image that is shown at the start |
EndRect | When using an iettPanZoom effect this is the portion of the image that is shown at the end |
RectMaintainAspectRatio | ImageEn will ensure that the starting and ending rects are automatically adjusted to ensure the resultant image has the correct aspect ratio (iettPanZoom only) |
iWidth, iHeight | The size to create the transition bitmaps. If either of these are -1 then the size will be the larger of the two images in each dimension. Aspect Ratios will be maintained and any non-image area will be filled with BackgroundColor |
bStretchSmall | If the images are smaller than the transition bitmap size (iWidth x iHeight) should they be stretched to fit (which can lead to distortion) |
BackgroundColor | The color that will be used for blank frames or non-image area (Default is clBlack) |
ResamplingFilter | The algorithm that is used to improve quality when resizing the source images |
Smoothing | In order to reduce the "jumpiness" of pan-zoom effects, transition frames can be alpha blended. A low value will improve smoothness, but increase blurriness. A high value will improve clarity, but increase jumpiness. Typical range is 64 - 196. 255 means no alpha blending (which is best when outputting to a bitmap) |
Timing | The rate at which the transition progresses |
Params | Extra transition properties |
Note:
◼Cannot be used if a
TIEDBMultiBitmap is
attached to the control or
is virtual◼You will need to add iexTransitions to your uses clause to access the transition types
// Create ten frames that use a cross dissolve transition from image 5 to image 6
MBitmap.InsertTransitionFrames(6, 10, iettCrossDissolve);
// Create ten Pan-Zoom frames for the image at index 5
// Top Left corner of image
StartingRect := Rect(0, 0, MBitmap.ImageWidth[5] div 4, MBitmap.ImageHeight[5] div 4);
// Bottom right corner of image
EndingRect := Rect(MulDiv(MBitmap.ImageWidth[5], 3, 4), MulDiv(MBitmap.ImageHeight[5], 3, 4), MBitmap.ImageWidth[5], MBitmap.ImageHeight[5]);
// Create frames
MBitmap.InsertTransitionFrames(5, 10, iettPanZoom, StartRect, EndRect);