/// <summary>
        /// Determines whether the specified <see cref="IMagickFormatInfo"/> is equal to the current <see cref="MagickFormatInfo"/>.
        /// </summary>
        /// <param name="other">The <see cref="IMagickFormatInfo"/> to compare this <see cref="MagickFormatInfo"/> with.</param>
        /// <returns>True when the specified <see cref="IMagickFormatInfo"/> is equal to the current <see cref="MagickFormatInfo"/>.</returns>
        public bool Equals(IMagickFormatInfo other)
        {
            if (other is null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Format == other.Format);
        }
        /// <summary>
        /// Returns true when the supplied formation information is supported.
        /// </summary>
        /// <param name="formatInfo">The format information to check.</param>
        /// <returns>True when the supplied formation information is supported.</returns>
        public bool IsSupported(IMagickFormatInfo formatInfo)
        {
            if (formatInfo == null)
            {
                return(false);
            }

            foreach (var optimizer in _optimizers)
            {
                if (optimizer.Format.Format == formatInfo.ModuleFormat)
                {
                    return(true);
                }
            }

            return(false);
        }
        private IImageOptimizer GetOptimizer(IMagickFormatInfo info)
        {
            if (info == null)
            {
                return(null);
            }

            foreach (var optimizer in _optimizers)
            {
                if (optimizer.Format.ModuleFormat == info.ModuleFormat)
                {
                    return(optimizer);
                }
            }

            if (IgnoreUnsupportedFormats)
            {
                return(null);
            }

            throw new MagickCorruptImageErrorException("Invalid format, supported formats are: " + SupportedFormats);
        }