I've narrowed it down to the nearest picture and it seems that after about 206MB (258 pictures in my test) the program crashes with an out of memory error. From the source code it seems that the full images are being buffered for displaying in the preview area, I'm wondering if this could be optimized by only storing thumbnails the size of the preview area and maybe using FileInfo to keep references to the original files. Not quite sure exactly how it'd work but it seems like something along those lines should significantly increase the amount of pictures able to be loaded (up to a few thousand from my calculations).
Thanks for all the work you've put into this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I figured each Img variable was storing its own full size image , so that might be what caused this memory error which I'm unable to reproduce for some reason. Anyway , I've changed it so that the image is only loaded upon trying to display it in the preview area , therefore not storing useless images. Also moved the 2 lines of code getting image size to that same method , which drastically improved loading times when loading a folder.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've narrowed it down to the nearest picture and it seems that after about 206MB (258 pictures in my test) the program crashes with an out of memory error. From the source code it seems that the full images are being buffered for displaying in the preview area, I'm wondering if this could be optimized by only storing thumbnails the size of the preview area and maybe using FileInfo to keep references to the original files. Not quite sure exactly how it'd work but it seems like something along those lines should significantly increase the amount of pictures able to be loaded (up to a few thousand from my calculations).
Thanks for all the work you've put into this.
I figured each Img variable was storing its own full size image , so that might be what caused this memory error which I'm unable to reproduce for some reason. Anyway , I've changed it so that the image is only loaded upon trying to display it in the preview area , therefore not storing useless images. Also moved the 2 lines of code getting image size to that same method , which drastically improved loading times when loading a folder.