Exemple #1
0
        internal static IImageData Create(IUrlResolver urlResolver, MagickFormatInfo formatInfo)
        {
            IFileUrlResolver fileUrlResolver = urlResolver as IFileUrlResolver;

            if (fileUrlResolver != null)
            {
                return(new FileImageData(fileUrlResolver.FileName, formatInfo));
            }

            IStreamUrlResolver streamUrlResolver = urlResolver as IStreamUrlResolver;

            DebugThrow.IfNull(streamUrlResolver);
            return(new StreamImageData(streamUrlResolver, formatInfo));
        }
 public StreamImageData(IStreamUrlResolver resolver, MagickFormatInfo formatInfo)
 {
     _Resolver  = resolver;
     FormatInfo = formatInfo;
 }