Hi Ray
Yes, you would need to use CreateTransitionBitmap to generate your transition bitmaps:
http://www.imageen.com/help/TImageEnProc.CreateTransitionBitmap.html
And add them to an AVI using:
https://www.imageen.com/help/TImageEnIO.SaveToAVI.html
const
Frames_Per_Second = 20;
Display_Seconds = 5;
var
proc: TImageEnProc;
io: TImageEnIO;
startBitmap, endBitmap : TIEBitmap;
i, frameCount: Integer;
transLevel: Single;
begin
startBitmap := TIEBitmap.Create;
endBitmap := TIEBitmap.Create;
proc := TImageEnProc.Create( nil );
io := TImageEnIO.Create( nil );
try
if io.CreateAVIFile('D:\Transition.avi', Frames_Per_Second, 'cvid' ) = ieaviNOCOMPRESSOR then
raise Exception.create( 'This compressor is unavailable!' );
startBitmap.LoadFromFile( 'D:\image1.jpg' );
endBitmap.LoadFromFile( 'D:\image2.jpg' );
// Call PrepareTransitionBitmaps once
proc.PrepareTransitionBitmaps(startBitmap, endBitmap, SelectedTransitionEffect);
frameCount := Display_Seconds * Frames_Per_Second;
for i := 0 to frameCount - 1 do
begin
// We want levels from 0% to 100% (show start and end)
transLevel := 100 / ( frameCount - 1 ) * i;
// Call CreateTransitionBitmap for each required frame
proc.CreateTransitionBitmap( transLevel, io.IEBitmap );
io.SaveToAVI();
Caption := IntToStr( Round( i / frameCount * 100 )) + '%';
end;
io.CloseAVIFile();
Caption := 'Done!';
finally
startBitmap.Free();
endBitmap.Free();
proc.Free();
io.Free();
end;
end;
Nigel
Xequte Software
www.imageen.com