eeyo
asked on
What is the least resource intensive .NET Winform control for displaying a large number of static images?
If I need to display a large number of static images on .NET Winform app, what .NET Control would use the least resources (memory, etc.)? Perhaps 20 or 30 small images on a singe form. They are static images that won't change, don't need to be loaded from a database or file. They don't need to raise any events, just look pretty. I was planning to use pictureboxes but they seem to be resource heavy. I was also entertaining using a no text Label and assign an image. Any thoughts?
If you talked about 20 - 30 thousand images then I could understand your worries. (Or is each image 100,000 x 100,000 in size).
ASKER
Each one will be about 100x200 or so, so not too large. I just seemed to remember that picturebox was a little resource heavy.
For what you are doing absolutely nothing to worry about.
ASKER
For future reference, if I did have lots of photos, what would be the best Winform control to reduce resource usage?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can still compress/optimise images, I would
https://tinyjpg.com/
https://tinyjpg.com/
ASKER
>>You can still compress/optimise images
Good point
Good point
jpg files are usually pretty much compressed. (Also doesn't make any difference AFAIK when actually loading/displaying in picture box).
Having a file as JPG does not guarantee that it is optimized. Compressing/optimization can reduce JPG up to 90%
As for it not contributing to loading, of course, it does. The only argument is if it would make a significant difference in loading 30 images
As for it not contributing to loading, of course, it does. The only argument is if it would make a significant difference in loading 30 images
I'm puzzled.
If you use eg. a bmp file for the image. Agreed compressing it into a zip file will save a lot of space. However the picturebox can't use the zip file can it? I thought it would first have to be unzipped to the original bmp file before the picturebox can display it. If I am correct then why is it more efficient to display a bmp file after decompressing it compared to the identical original bmp file?
If you use eg. a bmp file for the image. Agreed compressing it into a zip file will save a lot of space. However the picturebox can't use the zip file can it? I thought it would first have to be unzipped to the original bmp file before the picturebox can display it. If I am correct then why is it more efficient to display a bmp file after decompressing it compared to the identical original bmp file?
OK, thanks for explaining.