예제 #1
0
        static async Task <Image> CreateThumbnail(string blobReference, int maxPixels)
        {
            Func <Image, Func <int, Image> > ToThumbnailCurried = Curry <Image, int, Image>(ToThumbnail);

            Image thumbnail = await TaskEx.Pure(ToThumbnailCurried)
                              .Apply(DownloadImageAsync(blobReference))
                              .Apply(TaskEx.Pure(maxPixels));

            return(thumbnail);
        }
예제 #2
0
        public async Task <Image> BlendImagesFromBlobStorage(string blobReferenceOne, string blobReferenceTwo, Size size)
        {
            Func <Image, Func <Image, Func <Size, Image> > > BlendImagesCurried = Curry <Image, Image, Size, Image>(BlendImages);

            Task <Image> imageBlended =
                TaskEx.Pure(BlendImagesCurried)
                .Apply(DownloadImageAsync(blobReferenceOne))
                .Apply(DownloadImageAsync(blobReferenceTwo))
                .Apply(TaskEx.Pure(size));

            return(await imageBlended);
        }