Everywhere I find these two lines of code used to set filter for file system watcher in samples provided..
FileSystemWatcher watcher = new FileSystemWatcher(
You could also filter by using FileInfo by comparing to the string of the extension you're looking for.
For example the handler for a file changed event could look like:
void File_Changed(object sender, FileSystemEventArgs e)
{
FileInfo f = new FileInfo(e.FullPath);
if (f.Extension.Equals(".jpg") || f.Extension.Equals(".png"))
{
//Logic to do whatever it is you're trying to do goes here
}
}