Beispiel #1
0
        public static ToImageT Translate <FromImageT, ToImageT>(this IImageCodec <FromImageT, ToImageT> codec, FromImageT image)
        {
            if (codec is null)
            {
                throw new ArgumentNullException(nameof(codec));
            }

            return(codec.Translate(image, null));
        }
Beispiel #2
0
        public static Task <FromImageT> TranslateAsync <FromImageT, ToImageT>(this IImageCodec <FromImageT, ToImageT> codec, ToImageT image, IProgress prog)
        {
            if (codec is null)
            {
                throw new ArgumentNullException(nameof(codec));
            }

            return(Task.Run(() => codec.Translate(image, prog)));
        }