/// <summary> /// Creates a list, using reflection, of supported image formats that ImageProcessor can run. /// </summary> private void LoadSupportedImageFormats() { var formats = new List <ISupportedImageFormat> { new BitmapFormat(), new GifFormat(), new JpegFormat(), new PngFormat(), new TiffFormat() }; var type = typeof(ISupportedImageFormat); if (SupportedImageFormats == null) { var availableTypes = TypeFinder.GetAssembliesWithKnownExclusions() .SelectMany(a => AssemblyExtensions.GetLoadableTypes(a)) .Where(t => type.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract) .ToList(); formats.AddRange(availableTypes.Select(f => Activator.CreateInstance(f) as ISupportedImageFormat).ToList()); SupportedImageFormats = formats; } }