Reputation: 1076
had a project called Time Lapse Viewer which opens a folder with thousands of images and animates them using Timer.
The application is written in XAML by teh way and the code below is what I used to load the image.
bi = new BitmapImage();
bi.BeginInit();
bi.DecodePixelWidth = 720;
bi.CacheOption = BitmapCacheOption.OnLoad;
bi.UriSource = new Uri(this.ImageFilenames[this._image_index]);
bi.EndInit();
this.imgImage.Source = bi;
The images being loaded are from the DSLR and these images has 1536x2034 resolution and about 1.30+MB of size.
The code above is already fast enough to load the image in 720p but there are some noticable lag. I understand that when the image gets loaded for the first time, it requires some bit of time.
Is there anymore faster way to load an image other than loading them as a thumbnail?
Thanks.
Upvotes: 0
Views: 437
Reputation: 62093
But that is it. This is why most systems prepare thumbnails and store them in a separate file for repeated use.
Upvotes: 1