Author |
Topic |
|
and1989
Russia
4 Posts |
Posted - Apr 04 2017 : 06:13:05
|
I use TImageENMView with images. When in the list of images less than 300 everything works fine. But if you load 4000 images into the list, the error "out of memory" occurs. To solve this problem, we dynamically loaded images into the list. If the downloaded images will be more than 250, then we erase the entire list and load those on which the user is focused. This decision helped, but not for all cases. Sometimes, even with the number of images less than 250, an error occurs "out of memory".
On this line "out of memory". FImageMView.SetImage (fCurrentIndex, fCurrentBitMap);
P.S.: how can I free memory from the ministlist for specific images by index?
Best regards, Andrei Velganenko |
|
w2m
USA
1990 Posts |
Posted - Apr 04 2017 : 10:05:39
|
You can minimize memory requirements by using thumbnails rather than using the original normal image. You can display many more images as thumbnails than you can by loading the full image. This will reduce memory problems. You can then load the full normal image into ImageEnView when a image is selected in ImageEnMView by getting the file name from ImageEnMView and then use ImageEnView.LoadFromFile to display the full image.
There are numerous posts about this that you can search for.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
|
|
and1989
Russia
4 Posts |
Posted - Apr 04 2017 : 11:09:02
|
We use in our project thumbnails in a mini-sheet. I would like to know the maximum memory size, which you can use when working with the TImageENMView component. And how is it formed? Based on what? The resources of the computer are more than enough.
If there is an association from memory, then this error will in any case be repeated on a larger scale, even if the images are compressed. |
|
|
xequte
38610 Posts |
|
and1989
Russia
4 Posts |
Posted - Apr 07 2017 : 04:16:58
|
Many thanks for your answers. You pointed me in the right direction. I tested my system on 4000 pictures. Everything works perfectly!
Perhaps someone will come in handy. I used this approach:
ImageEnView1.MaintainInvisibleImages := 0; ImageEnView1.StoreType := ietThumb; ImageEnView1.ImageFileName[0] := path1; ... ImageEnView1.ImageFileName[N] := pathN;
To force a picture update, I used:
TImageEnMView.ReloadImage(idx);
Thanks again!
|
|
|
xequte
38610 Posts |
Posted - Apr 07 2017 : 18:35:41
|
Hi
EnsureImageLoaded() should give better performance than ReloadImage() as it only loads the image if needed. Did you have problems with it?
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
and1989
Russia
4 Posts |
Posted - Apr 10 2017 : 02:25:14
|
In our version of imageen, the TImageENMView does not have method EnsureImageLoaded(). Most likely we do not use the latest version. For our task, we need to read the image from the disk again, because It changes from the program. I will explain. The mini-list displays files from the repository. We select the image. It appears in the area of working with the image. Then we cut off, change the color,... After these operations, we save the result. After that we need to update the picture in the mini-list. We do this using ReloadImage(). |
|
|
|
Topic |
|