Example #1
0
        // 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);
            }
        }
Example #2
0
        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);
            }
        }