Considering that there are so many types of images formats out there, i want to know, other than checking its extension against a list of existing file types, is there a function to detect if a file is a type of image or not.
if you know what is the image file type (jpg. png…) then you can use this to select all files in directory of that type:
System.IO.Directory.GetFiles(“C:\Users\XXX\desktop\images”,"*.png")
You need to assign result of this method into Array of strings or List of Strings so it should look like this:
Ok thank you. It seems that there is no function that works like “isImage(fileToCheck)” that returns a Boolean value. Anyways, thank you for the info:)