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
 Capturing transitions frame by frame

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
keithml Posted - Feb 01 2013 : 08:06:45
Is there a way to capture the images produced by transitions at given intervals? For instance, get a snapshot of the image 20% into a transition.

To illustrate what I am asking how to do, it would be in the form of a function like:

RenderTransitionFrame(Effect:TIETransitionType;TimeElapsed,Duration:integer);

Thanks,
Keith
2   L A T E S T    R E P L I E S    (Newest First)
keithml Posted - Feb 01 2013 : 12:07:00
Thanks for the quick reply. That should work. It would be nicer if it were handled at the TImageEnView level instead of with TBitmaps, but that is not a big deal.

Keith
xequte Posted - Feb 01 2013 : 11:36:41
Hi Keith

Yes, see:

http://www.imageen.com/help/TImageEnProc.PrepareTransitionBitmaps.html
http://www.imageen.com/help/TImageEnProc.PrepareTransitionBitmapsEx.html
http://www.imageen.com/help/TImageEnProc.CreateTransitionBitmap.html

Example

procedure TransitionFrameCreationExample;
var
  OldBitmap, NewBitmap, TransBitmap : TBitmap;
  I : Integer;
  TransLevel : Single;
begin
  OldBitmap := TBitmap.Create;
  NewBitmap := TBitmap.Create;
  TransBitmap := TBitmap.Create;
  try
    OldBitmap.LoadFromFile('C:\OldImage.bmp');
    NewBitmap.LoadFromFile('C:\NewImage.bmp');

    // Call PrepareTransitionBitmaps once
    ImageEnProc.PrepareTransitionBitmaps(OldBitmap, NewBitmap, iettCrossDissolve);

    for i := 1 to 9 do
    begin
      // Transition levels from 10% to 90%
      TransLevel := i * 10;
      
      // Call CreateTransitionBitmap for each required frame
      ImageEnProc.CreateTransitionBitmap(TransLevel, TransBitmap);
      TransBitmap.SaveToFile('C:\TransImage' + IntToStr(I) + '.bmp');
    end;
  finally
    OldBitmap.Free;
    NewBitmap.Free;
    TransBitmap.Free;
  end;
end;



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com