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
 Assign to ImageENView with Transition?

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
Patrick Quinn Posted - Aug 21 2011 : 15:42:26
To show images full-screen in my viewer program, I use a borderless maximised form with an ImageENView aligned to alClient.
The user can cycle through full screen images of the main form ImageEnMview thumbnails, using the keyboard, with a transition at each image change.

This works very well - the transitions looks great - but on large images there is a noticeable lag between pressing the keyboard and the ImageEnView starting the transition, as it has to load the image from disk.

To get rid of this lag, I have tried using two TIEBitmaps (both with a TImageEnIO attached), and pre-loading the previous and next images into these.
I then then use:

ImageEnView.PrepareTransition
ImageEnView.IEBitmap.AssignImage(My TIEBitmap)
ImageEnView.RunTransition(xxx, xxx).

This gets rid of the time lag, but introduces a new problem - the ImageEnView doesn't autofit the image until the transition has finished, causing the image to jerk as it resizes when the transition finishes.

I guess assigning the new image to the ImageEnView.IEBitmap is wrong?
Is there a correct way of pre-loading an image then using transitions?

I hope I've explained this ok.

regards

Patrick
3   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Aug 22 2011 : 01:46:12
Actually ImageEnView.Update() is necessary whenever you change the internal IEBitmap (or Bitmap), but not for ImageEnView.Proc.etc calls. For example:

// update necessary
ImageEnView.IEBitmap.Fill(clBlack);
ImageEnView.Update();

// update not necessary
ImageEnView.Proc.Fill(clBlack);
Patrick Quinn Posted - Aug 22 2011 : 01:33:11
fabrizio

Thank you very much for your very quick reply.

Yes, that works!

(I should have thought of trying Update, but am still learning ImageEn. The more I learn, the more I realise how powerful ImageEn is. There is a lot to learn, though...)

regards

Patrick
fab Posted - Aug 21 2011 : 22:48:25
Hello,
call Update() just after AssignImage:

ImageEnView.PrepareTransition();
ImageEnView.IEBitmap.AssignImage(My TIEBitmap);
ImageEnView.Update(); <----
ImageEnView.RunTransition(xxx, xxx);