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
 LockPaint, UnlockPaint with ImageEnMView

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 - Feb 03 2013 : 08:57:14
Hi Fabrizio, Nigel, Bill.

I have added a feature so the user can change the size of directory thumbnails shown in an ImageEnMView, using
ImageEnMView.SetThumbnailSize
.This works, but if the thumbnails are enlarged this way the resolution is poor unless they are reloaded.

I have tried reloading them with both:
ImageEnMView.FillFromDirectory
and also this code
for i := 0 to ImageEnMView.ImageCount - 1 do
   ImageEnMView.ReloadImage(i);
Both work but with both methods thumbnails go blank until they have reloaded.

Is there a way of stopping the paint until all of the thumbnails have loaded, so thumbnails do not go blank during the reload?

I have tried putting ImageEnMView.LockPaint before the block of code and ImageEnMView.UnlockPaint after but it doesn't seem to make any difference - I assume because they are loading in separate threads?

I see that there is a TImageEnMView.OnAllDisplayed event but that isn't called until they have all been painted.

Is it possible to access an ImageEnMView.OnAllLoaded event, and put an ImageEnMView.UnLockPaint there?

Or is there another way to delay the repaint until all the thumbnails have loaded?

Thanks, Patrick

4   L A T E S T    R E P L I E S    (Newest First)
Patrick Quinn Posted - Feb 03 2013 : 16:24:11
Hi William. Thanks for your reply.

I am testing on folders containing around 90 - 100 assorted images, some of the images are quite large. I like testing on a 'worst case' scenario.

I tried changing StortType to ietNormal (and disabling my code reloading the thumbnails).

This did fix the poor resolution problem when the thumbnail size is changed, but it slows down the loading of the thumbnails when they initially load, so I have put it back to ietThumbnail.

Perhaps I am asking too much, it is a minor problem, but the ImageEnMView works so well.
If I had a way to stop the paint happening until all thumbnails had reloaded it would be even better.

regards

Patrick
w2m Posted - Feb 03 2013 : 15:04:02
How many images are there?

I do not have a problem with memory with StoreType set to ietNormal with caamera images. Have you tried ietNormal? What occurs if you do? Sorry I do not know how to prevent drawing the images.

William Miller
Patrick Quinn Posted - Feb 03 2013 : 13:48:57
Hi Bill

I am loading all types of images, some pretty big.

I have StoreType set to ietThumb. If I had StoreType set to ietNormal, the extra memory usage would severely limit the number of images that could be shown.

I don't have a problem with having to reload the thumbnails. I just want a way to stop the ImageEnMView painting until reloading is completed, so the images do not disappear and reappear again.

I cannot get LockPaint and Unlockpaint to do this.

regards

Patrick
w2m Posted - Feb 03 2013 : 10:27:25
What are the dimensions of the images you are loading?
Do you have StoreType set to ietNormal or ietThumb?
Did you try setting StoreType to ietNormal so you do not have to reload?

William Miller