ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Export transition to avi?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
yeohray2 Posted - Sep 10 2024 : 09:19:36
I'm current using the cross-dissolve transition to show one image merging into another. Is it possible to export the transition from image 1 to image 2 to an avi file?

Thank you.

Regards
Ray
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Sep 11 2024 : 17:00:54
You should also email me for the latest beta, which has a small improvement to transition bitmap exporting.

Nigel
Xequte Software
www.imageen.com
yeohray2 Posted - Sep 11 2024 : 04:10:20
Thank you very much for the help, Nigel.

Ray
xequte Posted - Sep 11 2024 : 02:16:15
Also see the demo:

\Demos\Multi\CreateTransitionFrames\CreateTransitionFrames.dpr

Nigel
Xequte Software
www.imageen.com
xequte Posted - Sep 11 2024 : 01:01:28
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