How to read list of images from a folder?
First Read all the image paths into a list, Let’s call it as List A, List A is List Of Strings.
Then Create a List of Images List B, List<System.Drawing.Image>
- Then Run foreach for List A
- Inside for each use Load Image Activity.
- Let us take each value as item in List A.
- Then Pass item in the field of path of Load Image Activity.
- Then create a image type variable imgC
- pass imgC in output Field.
- Now use Add to collections Activity and Add imgC to ListB
Now the List B will Contain Images
I have not tested this, But I think it will work.
Im getting errors while trying the same. Can you please share the xaml file?
Path-> string you folder location
string filePaths = Directory.GetFiles(path,"*.jpg")
Hi, can you share XAML file.
Ok, I will try it!
Any idea on getting String, I am getting error…value of 1-d array of string cannot be converted to string
Use (.ToString). It’ll solve your problem.