Answer the question
In order to leave comments, you need to log in
C# working with pictures
There is an application that takes a lot of pictures from the camera. There is a task to display them on the TimeLine, as well as play the video.
Each time you capture a picture, it is saved to disk. Then the picture is loaded:
BitmapImage bmp = new BitmapImage();
bmp.BeginInit();
bmp.DecodePixelHeight = sizeHeight;
bmp.DecodePixelWidth = sizeWidth;
bmp.UriSource = new Uri(fileName, UriKind.RelativeOrAbsolute);
bmp.EndInit();
sizeHeight and sizeWidth are passed to the method and are half the size of the captured image. When processing the size of the original image 640 by 480, we get RAM consumption of 160 MB/100 images. After that, the picture is stored in the List and displayed on the TimeLine.
The question is whether it is possible to somehow optimize the work with pictures, because the task is to work with 2-3 thousand pictures.
Answer the question
In order to leave comments, you need to log in
Each time you capture a picture, it is saved to disk. The image is then loaded.But why such difficulties? Why upload it again to display it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question