private void RenderMandelbrot <T>(Options options) where T : IGenerator, new() { var arguments = DeserializeArguments <ExampleImageRendererArguments>(options.ConfigurationFilepath); var viewPort = AreaFactory.SearchArea; var renderer = Activator.CreateInstance <T>(); Color[,] output = renderer.Render(arguments.Resolution.ToSize(), viewPort); Bitmap image = ImageUtility.ColorMatrixToBitmap(output); image.Save(Path.Combine(arguments.OutputDirectory, String.Format("{0}.png", arguments.OutputFilename))); }