示例#1
0
        public async Task <JsonResult> DimAsync(FullPath path)
        {
            using var stream = new FileStream(path.File.FullName, FileMode.Open);
            var response = new DimResponseModel(path.RootVolume.PictureEditor.ImageSize(stream));

            return(await Json(response));
        }
示例#2
0
        public async Task <JsonResult> Dim(string target)
        {
            FullPath         path     = ParsePath(target);
            DimResponseModel response = new DimResponseModel(path.Root.GetImageDimension(path.File));

            return(await Json(response));
        }
示例#3
0
 public async Task <JsonResult> DimAsync(FullPath path)
 {
     using (var stream = await AzureStorageAPI.FileStreamAsync(path.File.FullName))
     {
         var response = new DimResponseModel(path.RootVolume.PictureEditor.ImageSize(stream));
         return(await Json(response));
     }
 }
 public Task <ConnectorResult> DimAsync(FullPath path)
 {
     using (var stream = new FileStream(path.File.FullName, FileMode.Open))
     {
         var response = new DimResponseModel(path.RootVolume.PictureEditor.ImageSize(stream));
         return(Task.FromResult(new ConnectorResult(response)));
     }
 }