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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnMView + TIEHorizontalFlow question
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

bolide

3 Posts

Posted - Jun 25 2014 :  13:21:56  Show Profile  Reply
hi!

I am using TImageEnMView (providing the images with OnImageIDRequest, 10 images cache). Trying to add the cover flow view type using TIEHorizontalFlow animation. All works fine, but I need more :)

I am using smaller images for filling the TImageEnMView, but I have larger versions of those images too. How can I pass the larger image for the selected (central in TIEHorizontalFlow) image ONLY?

Or, at least, how can I detect the end of animation process, when the selected image took the center place? I guess, I can replace the selected image with my own then.

thanks!

xequte

39056 Posts

Posted - Jun 25 2014 :  13:56:18  Show Profile  Reply
Hi

You would need to replacethe image (TImageEnMView.SetIEBitmap) and then update the TImageEnMView.

The OnImageSelect event will tell you when an image becomes active:

http://www.imageen.com/help/TImageEnMView.OnImageSelect.html



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

bolide

3 Posts

Posted - Jun 25 2014 :  23:35:13  Show Profile  Reply
Thanks, Nigel! I implemented replacing the images in OnImageSelect and OnImageDeselect (changing back to the low resolution image to decrease memory and CPU used by animation).

However, OnImageSelect occurs before the animation start and the animation should handle the high resolution image. I guess, it is slower than animate low resolution image and change it to the highres one when animation ends. The problem is I cannot detect when animation ends. May be I miss some event for this?
Go to Top of Page

xequte

39056 Posts

Posted - Jun 26 2014 :  16:55:17  Show Profile  Reply
Hi

Sorry, to clarify, you want the active image displayed at high resolution, but all of the other images in the grid stored low resolution? What size are you showing the active image?


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

bolide

3 Posts

Posted - Jun 26 2014 :  23:49:46  Show Profile  Reply
For example - the thumbnails are approximately 120x170 pixels. They are used in TImageEnMView with variable width and height. Also, I have the original images with the size, say, 600x850 pixels (actual images has different sizes, but they resolution is several times larger than in their thumbnail copies).

I digged the source code of IEAnimation and ImageEnMView and I see no handy way to display higher resolution central image in TIEHorizontalFlow after then animation ends. It is possible, but requires your source code modification.

Currently I am changing the image to the larger one in OnImageSelect. It works and the central image looks much better, but the way it done is not optimal :) I guess, it is better to replace the image after the animation ends than on animation start.

Another non-optimal way to implement it is to add the timer with the delay equal to animation duration and replace the image in OnTimer.
Go to Top of Page

xequte

39056 Posts

Posted - Jun 29 2014 :  21:39:21  Show Profile  Reply
So, are you finding that when you use all original size images that the performance is compromised? Or are you concerned about the memory impact?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: