Image Loading Recommendations lazarus / 39-Graphics ---------------------------------------------------------------------- sfeinst · 2011-11-16 20:01 I have about 50 images to load into my application.  The images on disk take about 250kb.  Only a couple of images are ever shown at one time, but over the course of running the app all 50 will display.  The speed of display of the image during my tests does not seem to matter if the image is preloaded or not. I've come up with the following options and am wondering which one (or if there is another though, that one) makes the most sense. 1) Use a TImageList and add the images at design time.  This will be the quickest when switching images - though as mentioned above, not enough to matter.  All  images will be included in the executable which increases executable size and RAM usage, but removes the need for me to deploy the images with the application and write code to figure out where they are located and load them. 2) Use a TImagelist but load the list at form create.  This will have the same speed (after startup) as #1 and the same RAM usage, but the executable will be smaller.  Though I will then need a way to find the deployed images and I will also have to have the user deploy the images. 3) Use TImage where needed and at runtime load the actual image when requested.  This will keep memory usage down and executable size down, but will require deploying the images and writing code to find the images.  Technically slower as well, though as mentioned, speed has not been an issue. In the above, when I mention finding images, I mean determine best way to tell the application where the images are stored (properties file, base it off executable location or some other technique I can use).  Not a lot of code or effort, but more than preloading at design time. Wondering what others think of the options. Thanks, Steve ---------------------------------------------------------------------- lainz · 2011-11-16 23:32 If you load from file, you need to ensure that you use UTF8 for paths with unicode characters. In Windows you can run the exe with a different working folder, so you must ensure that the working folder isn't used in the image path, use the exe location. ---------------------------------------------------------------------- Swinburne · 2013-04-12 03:12 Hmmmm, compared with your method to load images, i would like to use a image load program to finish that image loading work. here is a image loading application  im using now, youc an choose load image from file or url or your .net graphics. ---------------------------------------------------------------------- User137 · 2013-04-12 05:46 Quote from: sfeinst on November 16, 2011, 09:01:50 pmI have about 50 images to load into my application.  The images on disk take about 250kb.Are they BMP, JPG, PNG or something else, and have you tested the actual memory use? Those would be very big for JPG's, and uncompressed could take a decent 200Mb RAM when all are loaded. Just guessing. With some simple images like 40x40 size you can easily do options 1 or 2, but with larger i'd go with 3. You can also try loading from resources or something, to include them in executable. But then the project will open faster for Lazarus, when you don't have them loaded in design time always.