Browse Source

Throw useful error

af/merge-core
James Jackson-South 9 years ago
parent
commit
09d01a1d37
  1. 5
      src/ImageSharp/Image/Image{TColor}.cs

5
src/ImageSharp/Image/Image{TColor}.cs

@ -49,6 +49,11 @@ namespace ImageSharp
public Image(int width, int height, Configuration configuration = null)
: base(width, height, configuration)
{
if (!this.Configuration.ImageFormats.Any())
{
throw new NotSupportedException("No image formats have been configured.");
}
this.CurrentImageFormat = this.Configuration.ImageFormats.First();
}

Loading…
Cancel
Save