// TODO: do something with this? public static void AssertAnimationSupport(ImageFormat format, ImagingConfig config) { if (config == null) { throw new ArgumentNullException(nameof(config)); } if (format is not IAnimatedFormatAttribute) { throw new AnimationNotSupportedException(format); } }
public static void AssertAnimationSupport(IImageCoder coder, ImagingConfig config) { if (coder == null) { throw new ArgumentNullException(nameof(coder)); } AssertAnimationSupport(coder.Format, config); if (coder is not IAnimatedFormatAttribute) { throw new AnimationNotImplementedException(coder); } }